Release of upgrade for phpbb2.0.20

Support for IntegraMOD 140

Moderator: Integra Moderator

Re: Release of upgrade for phpbb2.0.20

PostAuthor: ayasha » Mon Apr 17, 2006 10:59 am

"found it";p="1853" wrote:try this one i think the first post got corrupted.....


is this the code changes we are suppose to use?
Last edited by ayasha on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 6:10 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Vixje » Mon Apr 17, 2006 12:19 pm

did the upgrade, now the board is broke.

this is the error:

Fatal error: Call to undefined function: phpbbsecurity_guests() in D:WebserverApacheApache2wwwwww.domain.extcommon.php on line 396
Last edited by Vixje on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Vixje
Newbie
Newbie
 
Posts: 12
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 15, 2006 7:42 am
Cash on hand: 0.00

PostAuthor: Eon » Mon Apr 17, 2006 1:25 pm

Glad that was not a live one there. <img>
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: Vixje » Mon Apr 17, 2006 1:41 pm

lol true
Last edited by Vixje on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Vixje
Newbie
Newbie
 
Posts: 12
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 15, 2006 7:42 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: ayasha » Mon Apr 17, 2006 2:12 pm

can i ask what to do if i do not have this line in my file? and it does not say to replace it with anything, or to add anything before or after

admin/pagestart.php

#
#-----[ FIND ]---------------------------------------------
# Line 47
message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{
Last edited by ayasha on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 6:10 pm
Cash on hand: 0.00

PostAuthor: Eon » Mon Apr 17, 2006 2:18 pm

Depends. read the instructions at the top and it explains that. It may ask you to find the first instance of that, then find something after that to replace it. If tehre are multiplie instances of it in the file.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: ayasha » Mon Apr 17, 2006 2:35 pm

ok, here are the entire intructions for that particular file, and as i said, i do not have that instance at all that is says to find, but does not say what to do, i understand that the second bit of code, you just delete

#
#-----[ OPEN ]---------------------------------------------
#
admin/pagestart.php

#
#-----[ FIND ]---------------------------------------------
# Line 47
message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{

#
#-----[ FIND ]---------------------------------------------
# Line 57
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['script_path'])), '', $url);
$url = str_replace('//', '/', $url);
$url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);
$url = preg_replace('/?$/', '', $url);
$url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];


#
#-----[ REPLACE WITH ]---------------------------------------------
# Just remove/delete the lines (replacing with an empty line)

Last edited by ayasha on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 6:10 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Mon Apr 17, 2006 3:01 pm

"cleo";p="2047" wrote:ok, here are the entire intructions for that particular file, and as i said, i do not have that instance at all that is says to find, but does not say what to do, i understand that the second bit of code, you just delete

#
#-----[ OPEN ]---------------------------------------------
#
admin/pagestart.php

#
#-----[ FIND ]---------------------------------------------
# Line 47
message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{

#
#-----[ FIND ]---------------------------------------------
# Line 57
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['script_path'])), '', $url);
$url = str_replace('//', '/', $url);
$url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);
$url = preg_replace('/?$/', '', $url);
$url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];


#
#-----[ REPLACE WITH ]---------------------------------------------
# Just remove/delete the lines (replacing with an empty line)



On the bit that starts line 57...just remove the code that it tells you to...

Code: Select all
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);     $url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['script_path'])), '', $url);     $url = str_replace('//', '/', $url);     $url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);     $url = preg_replace('/?$/', '', $url);     $url .= ((strpos($url, '?')) ? '&' ]


remove this
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: ayasha » Mon Apr 17, 2006 3:04 pm

thanks found it, just wanted to make sure i did not need that first find.
Last edited by ayasha on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 6:10 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Mon Apr 17, 2006 3:07 pm

No problem

sorry the install file is a lot clearer i just used phpbbs file and remove some bits...though you need to double check with the premodded files as some of the file edits are not needed and i cannot remember if i removed them all.....

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: ayasha » Mon Apr 17, 2006 3:15 pm

i think you did a great job with it, with everything you do, i know you stay so busy, and i am most appreciative for you taking the time to do this install upgrade. <img>
Last edited by ayasha on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 6:10 pm
Cash on hand: 0.00

PostAuthor: ayasha » Tue Apr 18, 2006 7:42 am

ok, i finally got finished with the upgrade this morning, and i get this error


Parse error: syntax error, unexpected $end in D:xampphtdocspspincludessessions.php on line 588

here is my line 588

?>

any suggestions?
Last edited by ayasha on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 6:10 pm
Cash on hand: 0.00

PostAuthor: Nata » Tue Apr 18, 2006 8:00 am

verify if there is no space after ?> and before
Last edited by Nata on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Nata
Translation Team
Translation Team
 
Posts: 83
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 10:14 pm
Cash on hand: 0.00

PostAuthor: ayasha » Tue Apr 18, 2006 11:51 am

there is no space before or after
Last edited by ayasha on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 6:10 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: dpmcalister » Tue Apr 18, 2006 12:08 pm

How do you find out what version of phpBB Security you're running?
Last edited by dpmcalister on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
That's a negative GH05TR1D3R, the pattern is full.
[img=left]http://www.iwarpuk.org/images/sigs/GH05TR1D3R.jpg[/img]
User avatar
dpmcalister
Newbie
Newbie
 
Posts: 9
Likes: 0 post
Liked in: 0 post
Joined: Tue Apr 11, 2006 4:55 am
Cash on hand: 0.00

PostAuthor: Eon » Tue Apr 18, 2006 1:07 pm

In the ACP it will say 1.03 at the top if you are running it. If it doesn't, then you are using 1.02.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: dpmcalister » Tue Apr 18, 2006 1:10 pm

Thanks
Last edited by dpmcalister on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
That's a negative GH05TR1D3R, the pattern is full.
[img=left]http://www.iwarpuk.org/images/sigs/GH05TR1D3R.jpg[/img]
User avatar
dpmcalister
Newbie
Newbie
 
Posts: 9
Likes: 0 post
Liked in: 0 post
Joined: Tue Apr 11, 2006 4:55 am
Cash on hand: 0.00

PostAuthor: found it » Tue Apr 18, 2006 1:31 pm

"cleo";p="2144" wrote:ok, i finally got finished with the upgrade this morning, and i get this error


Parse error: syntax error, unexpected $end in D:xampphtdocspspincludessessions.php on line 588

here is my line 588

?>

any suggestions?


Hi can you show me your sessions file
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: Jason Sanborn » Tue Apr 18, 2006 2:45 pm

I upgraded a test site to 2.0.20 and noticed that the ranks page in the ACP is no longer functioning (white page). Has anyone else experienced this issue?
Last edited by Jason Sanborn on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 10:40 am
Cash on hand: 0.00
Location: Marina, CA

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Tue Apr 18, 2006 3:00 pm

Hi

Nice find just tested this....

DSid you use the premodded files....?

I missed a
Code: Select all
)


on line 281

it should be

Code: Select all
    $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm )


but it is

Code: Select all
    $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm


just need to add the ) at the end
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: Jason Sanborn » Tue Apr 18, 2006 3:06 pm

I was using premodded files. :)
Last edited by Jason Sanborn on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 10:40 am
Cash on hand: 0.00
Location: Marina, CA

PostAuthor: found it » Tue Apr 18, 2006 3:08 pm

"Jason Sanborn";p="2210" wrote:I was using premodded files. :)



thanks again for highlighting my error.... :D
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: Thug Lyfe » Tue Apr 18, 2006 3:34 pm

"Eon";p="2184" wrote:In the ACP it will say 1.03 at the top if you are running it. If it doesn't, then you are using 1.02.


well i guess i'm not on 1.03 then....how can i update?
Last edited by Thug Lyfe on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Thug Lyfe
Members
Members
 
Posts: 30
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 2:09 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Tue Apr 18, 2006 3:50 pm

there is a post on the old integramod site with the files ....I think they are in the download section...
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Thug Lyfe » Tue Apr 18, 2006 4:57 pm

found it thanks <img>
Last edited by Thug Lyfe on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Thug Lyfe
Members
Members
 
Posts: 30
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 2:09 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Bush » Tue Apr 18, 2006 5:59 pm

"found it";p="2208" wrote:Hi

Nice find just tested this....

DSid you use the premodded files....?

I missed a
Code: Select all
)


on line 281

it should be

Code: Select all
    $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm )


but it is

Code: Select all
    $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm


just need to add the ) at the end


Found IT

I just wanted to let you know, I updated to PS 1.0.3 and phpBB 2.0.20 by hand (did not use pre-modded files) and I did not have to fix this.

Just a heads up to those who did not use pre-modded files.
Last edited by Bush on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
no signature.

Bush
Integra Member
Integra Member
 
Posts: 191
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 8:55 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Threat009 » Wed Apr 19, 2006 12:00 pm

Hi Guys!

Grateful for the quick update and all efforts put into it, but I'm in need of a little clarification here.

admin/admin_ranks.php There are 2 parts confusing me, where we are directed to find certain lines, but before we are instructed what to do w/these lines, we are directed to find a new line?? <!-- s]##-----[ FIND ]---------------------------------------------# Line 17  *   the Free Software Foundation; either version 2 of the License, or  *   (at your option) any later version.  *  ***************************************************************************/    ##-----[ FIND ]---------------------------------------------# Line 21define('IN_PHPBB', 1);    ##-----[ REPLACE WITH ]---------------------------------------------# Just remove/delete the lines (replacing with an empty line)  [/php]
Code: Select all
##-----[ FIND ]---------------------------------------------# Line 273         }         else         {             $rank_id = 0;         }  ##-----[ FIND ]---------------------------------------------# Line 279                 if( $rank_id )  ##-----[ REPLACE WITH ]---------------------------------------------#           $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm )  

Also, Originally I had downloaded 2 files from here for this update. Integramod_2.0.19-2.0.20 and bbcode.php. At first glance I couldn't find bbcode.php, so I had intended on asking about that anyway. I noticed the bbcode.php file is no longer up for download. Is this something I need or should be concerned with?

Thanks for any further help here................
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

PostAuthor: Eon » Wed Apr 19, 2006 1:06 pm

It is just tellingg you that you need to find that instance after the first find.

I think they updated those files in the download. That is probably why it is no longer an indvidual download.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: Threat009 » Wed Apr 19, 2006 1:27 pm

"Eon";p="2317" wrote:It is just tellingg you that you need to find that instance after the first find.

I think they updated those files in the download. That is probably why it is no longer an indvidual download.

Just found the multiple "FIND" info under the mod description, feeling dopey now :grin:

[color=red]edit] N/M found it! All good for now..... <img>
Last edited by Threat009 on Wed Apr 19, 2006 1:33 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Wed Apr 19, 2006 1:32 pm

I updated the download, the bbcode.php file was only if you are using the premodded files.....

all the files are updated and correct at this time...
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: gcomfx.com » Wed Apr 19, 2006 4:19 pm

Hey guys... updated security, no problem. Updated to .20 again no problems. All with Pre-modded files. I did find the bbcode.zip file added extra to the download. :? At least it does this on my site. The only edit I have is I // the two lines about the [you] bbcode.
Last edited by gcomfx.com on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Paul (gcomfx) - 100mphclub.com originator
[size=99px]
User avatar
gcomfx.com
Sr Integra Member
Sr Integra Member
 
Posts: 251
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:34 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Threat009 » Wed Apr 19, 2006 10:20 pm

Okay I did it, and once again thankyou for the update. Judging by the amount of time it took me to manually update this thing, I can tell alot of work was put into this update, so thanks again, I'm grateful.

At first glance everything looks fine, however I did run across one major problem. No one can post! I think it's an easy fix, but I can't figure it out.

Error]
Parse error: parse error, unexpected $ in /home/Threat/public_html/Portal/posting.php on line 1339

[color=green]posting.php

[php]<php> 'post','news_category' => 'news_category', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode');while( list($var, $param) = @each($params) ){     if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) )     {         $$var = ( !empty($HTTP_POST_VARS[$param]) ) ? htmlspecialchars($HTTP_POST_VARS[$param]) : htmlspecialchars($HTTP_GET_VARS[$param]);     }     else     {         $$var = '';     }}  $confirm = isset($HTTP_POST_VARS['confirm']) ? true : false;  $params = array('forum_id' => POST_FORUM_URL, 'topic_id' => POST_TOPIC_URL, 'post_id' => POST_POST_URL, 'lock_subject' => 'lock_subject');while( list($var, $param) = @each($params) ){     if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) )     {         $$var = ( !empty($HTTP_POST_VARS[$param]) ) ? intval($HTTP_POST_VARS[$param]) : intval($HTTP_GET_VARS[$param]);     }     else     {         $$var = '';     }}  $refresh = $preview || $poll_add || $poll_edit || $poll_delete;$orig_word = $replacement_word = array();//-- mod : post icon -------------------------------------------------------------------------------//-- add$post_icon = isset($HTTP_POST_VARS['post_icon']) ? intval($HTTP_POST_VARS['post_icon']) : 0;//-- fin mod : post icon ---------------------------------------------------------------------------    //// Set topic type//$topic_type = ( !empty($HTTP_POST_VARS['topictype']) ) ? intval($HTTP_POST_VARS['topictype']) : POST_NORMAL;$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE, POST_GLOBAL_ANNOUNCE )) ) ? $topic_type : POST_NORMAL;//-- mod : calendar --------------------------------------------------------------------------------//-- add/*$year  = ( !empty($HTTP_POST_VARS['topic_calendar_year']) ) ? intval($HTTP_POST_VARS['topic_calendar_year']) : '';$month   = ( !empty($HTTP_POST_VARS['topic_calendar_month']) ) ? intval($HTTP_POST_VARS['topic_calendar_month']) : '';$day     = ( !empty($HTTP_POST_VARS['topic_calendar_day']) ) ? intval($HTTP_POST_VARS['topic_calendar_day']) : '';$hour    = ( !empty($HTTP_POST_VARS['topic_calendar_hour']) ) ? intval($HTTP_POST_VARS['topic_calendar_hour']) : '';$min     = ( !empty($HTTP_POST_VARS['topic_calendar_min']) ) ? intval($HTTP_POST_VARS['topic_calendar_min']) : '';*/$calendar_event = ( !empty($HTTP_POST_VARS['calendar_event']) ) ? trim($HTTP_POST_VARS['calendar_event']) : '';$calendar_duration = ( !empty($HTTP_POST_VARS['calendar_duration']) ) ? trim($HTTP_POST_VARS['calendar_duration']) : '';/*$d_day     = ( !empty($HTTP_POST_VARS['topic_calendar_duration_day']) ) ? intval($HTTP_POST_VARS['topic_calendar_duration_day']) : '';$d_hour  = ( !empty($HTTP_POST_VARS['topic_calendar_duration_hour']) ) ? intval($HTTP_POST_VARS['topic_calendar_duration_hour']) : '';$d_min   = ( !empty($HTTP_POST_VARS['topic_calendar_duration_min']) ) ? intval($HTTP_POST_VARS['topic_calendar_duration_min']) : '';if ( empty($year) || empty($month) || empty($day) ){     $year = '';     $month = '';     $day = '';     $hour = '';     $min = '';     $d_day = '';     $d_hour = '';     $d_min = '';}if (empty($hour) && empty($min)){     $hour = '';     $min = '';     $d_hour = '';     $d_min = '';}*/  // start event$topic_calendar_time = 0;if (!empty($calendar_event)){     $topic_calendar_time = strtotime($calendar_event);}  // duration$topic_calendar_duration = 0;if ( !empty($topic_calendar_time) && !empty($calendar_duration) ){     $topic_calendar_duration = strtotime($calendar_duration) - $topic_calendar_time;     if ($topic_calendar_duration <0>sql_query($sql) ) {        $info = $db->sql_fetchrow($result);        $auth_forum = $info['forum_id'];        $db->sql_freeresult($result);    } else {        message_die(GENERAL_ERROR, 'Could not query table', '', __LINE__, __FILE__, $sql);    } } else {    message_die(GENERAL_ERROR, 'Could not fetch forum id for setting up security', '', __LINE__, __FILE__, $sql); } $is_auth = $tree['auth'][POST_FORUM_URL . $auth_forum]; //-- mod : calendar --------------------------------------------------------------------------------//-- add$is_auth_type = '';$is_auth_type_cal = '';//-- fin mod : calendar ----------------------------------------------------------------------------switch( $mode ){     case 'newtopic':         if ( $topic_type == POST_ANNOUNCE )         {             $is_auth_type = 'auth_announce';         }//-- mod : announces -------------------------------------------------------------------------------//-- add         else if ( $topic_type == POST_GLOBAL_ANNOUNCE )         {             $is_auth_type = 'auth_global_announce';         }//-- fin mod : announces ---------------------------------------------------------------------------         else if ( $topic_type == POST_STICKY )         {             $is_auth_type = 'auth_sticky';         }         else         {             $is_auth_type = 'auth_post';         }//-- mod : calendar --------------------------------------------------------------------------------//-- add         if (!empty($topic_calendar_time))         {             $is_auth_type_cal = 'auth_cal';         }//-- fin mod : calendar ----------------------------------------------------------------------------         break;     case 'reply':     case 'quote':         $is_auth_type = 'auth_reply';         break;     case 'editpost':         $is_auth_type = 'auth_edit';         break;     case 'delete':     case 'poll_delete':         $is_auth_type = 'auth_delete';         break;     case 'vote':         $is_auth_type = 'auth_vote';         break;     case 'topicreview':         $is_auth_type = 'auth_read';         break;     default:         message_die(GENERAL_MESSAGE, $lang['No_post_mode']);         break;}  //// Here we do various lookups to find topic_id, forum_id, post_id etc.// Doing it here prevents spoofing (eg. faking forum_id, topic_id or post_id//$error_msg = '';$post_data = array();switch ( $mode ){     case 'newtopic':         if ( empty($forum_id) )         {             message_die(GENERAL_MESSAGE, $lang['Forum_not_exist']);         }           $sql = "SELECT *             FROM " . FORUMS_TABLE . "             WHERE forum_id = $forum_id";         break;       case 'reply':     case 'vote':         if ( empty( $topic_id) )         {             message_die(GENERAL_MESSAGE, $lang['No_topic_id']);         }           $sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_type             FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t             WHERE t.topic_id = $topic_id                 AND f.forum_id = t.forum_id";         break;       case 'quote':     case 'editpost':     case 'delete':     case 'poll_delete':         if ( empty($post_id) )         {             message_die(GENERAL_MESSAGE, $lang['No_post_id']);         }  //-- mod : announces -------------------------------------------------------------------------------// here we added//   , t.topic_announce_duration//-- modify//-- mod : calendar --------------------------------------------------------------------------------// here we added//   , t.topic_calendar_time, t.topic_calendar_duration//-- modify//-- mod : post icon -------------------------------------------------------------------------------// here we added//   , t.topic_icon//   , p.post_icon//-- modify         $select_sql = (!$submit) ? ', t.topic_title, t.topic_desc, t.topic_icon, t.topic_calendar_time, t.topic_calendar_duration, t.topic_calendar_repeat, t.topic_announce_duration, t.news_id, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, p.post_icon, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';         $from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';         $where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';//-- fin mod : post icon ---------------------------------------------------------------------------//-- fin mod : calendar ----------------------------------------------------------------------------//-- fin mod : announces ---------------------------------------------------------------------------           $sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, t.topic_time, p.post_id, p.poster_id" . $select_sql . "             FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "             WHERE p.post_id = $post_id                 AND t.topic_id = p.topic_id                 AND f.forum_id = p.forum_id                 $where_sql";         break;       default:         message_die(GENERAL_MESSAGE, $lang['No_valid_mode']);}  if ( $result = $db->sql_query($sql) ){     $post_info = $db->sql_fetchrow($result);     $db->sql_freeresult($result);       $forum_id = $post_info['forum_id'];//-- mod : categories hierarchy --------------------------------------------------------------------//-- delete//   $forum_name = $post_info['forum_name'];//-- add     $forum_name = get_object_lang(POST_FORUM_URL . $post_info['forum_id'], 'name');//-- fin mod : categories hierarchy ----------------------------------------------------------------//-- mod : calendar --------------------------------------------------------------------------------//-- add     if (!empty($post_info['topic_calendar_duration']))     {         $post_info['topic_calendar_duration']++;     }//-- fin mod : calendar ----------------------------------------------------------------------------       //     // Topic Lock/Unlock     //     $lock = ( isset($HTTP_POST_VARS['lock']) ) ? TRUE : FALSE;     $unlock = ( isset($HTTP_POST_VARS['unlock']) ) ? TRUE : FALSE;         if ( ($submit || $confirm) && ($lock || $unlock) && ($is_auth['auth_mod']) && ($mode != 'newtopic') && (!$refresh) )     {         $t_id = ( !isset($post_info['topic_id']) ) ? $topic_id : $post_info['topic_id'];           if ( $unlock )         {             $sql = "UPDATE " . TOPICS_TABLE . "             SET topic_status = " . TOPIC_UNLOCKED . "             WHERE topic_id = " . $t_id . "             AND topic_moved_id = 0";         }         else if ($lock)         {             $sql = "UPDATE " . TOPICS_TABLE . "             SET topic_status = " . TOPIC_LOCKED . "             WHERE topic_id = " . $t_id . "             AND topic_moved_id = 0";         }           if ($lock || $unlock)         {             if ( !($result = $db->sql_query($sql)) )             {                 message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);             }         }     }       if ( $post_info['forum_status'] == FORUM_LOCKED && !$is_auth['auth_mod'])     {        message_die(GENERAL_MESSAGE, $lang['Forum_locked']);     }     else if ( $mode != 'newtopic' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])     {        message_die(GENERAL_MESSAGE, $lang['Topic_locked']);     }       if ( $mode == 'editpost' || $mode == 'delete' || $mode == 'poll_delete' )     {         $topic_id = $post_info['topic_id'];           $post_data['poster_post'] = ( $post_info['poster_id'] == $userdata['user_id'] ) ? true : false;         $post_data['first_post'] = ( $post_info['topic_first_post_id'] == $post_id ) ? true : false;         $post_data['last_post'] = ( $post_info['topic_last_post_id'] == $post_id ) ? true : false;         $post_data['last_topic'] = ( $post_info['forum_last_post_id'] == $post_id ) ? true : false;         $post_data['has_poll'] = ( $post_info['topic_vote'] ) ? true : false;         $post_data['topic_type'] = $post_info['topic_type'];         $post_data['topic_time'] = $post_info['topic_time'];//-- mod : post icon -------------------------------------------------------------------------------//-- add         $post_data['post_icon'] = $post_info['post_icon'];//-- fin mod : post icon ---------------------------------------------------------------------------//-- mod : calendar --------------------------------------------------------------------------------//-- add         $post_data['topic_calendar_time'] = $post_info['topic_calendar_time'];         $post_data['topic_calendar_duration'] = $post_info['topic_calendar_duration'];// repeat         $post_data['topic_calendar_repeat'] = $post_info['topic_calendar_repeat'];         $repeat_mode = $post_info['topic_calendar_repeat'];         if($repeat_mode)         {             $repeat_type = substr($repeat_mode,0,2);             $repeat_type_value = substr($repeat_mode,2,2);         }//-- fin mod : calendar ----------------------------------------------------------------------------//-- mod : announces -------------------------------------------------------------------------------//-- add         $post_data['topic_announce_duration'] = $post_info['topic_announce_duration'];//-- fin mod : announces ---------------------------------------------------------------------------         $post_data['poster_id'] = $post_info['poster_id'];           if ( $post_data['first_post'] && $post_data['has_poll'] )         {             $sql = "SELECT *                 FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr                 WHERE vd.topic_id = $topic_id                     AND vr.vote_id = vd.vote_id                 ORDER BY vr.vote_option_id";             if ( !($result = $db->sql_query($sql)) )             {                 message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);             }               $poll_options = array();             $poll_results_sum = 0;             if ( $row = $db->sql_fetchrow($result) )             {                 $poll_title = $row['vote_text'];                 $poll_id = $row['vote_id'];                 $poll_length = intval($row['vote_length'] / 86400);                 $poll_length_h = intval( ( $row['vote_length'] - ( $poll_length *86400) ) /3600 ) ;                 $max_vote = $row['vote_max'];                 $hide_vote = $row['vote_hide'];                 $tothide_vote = $row['vote_tothide'];                   do                 {                     $poll_options[$row['vote_option_id']] = $row['vote_option_text'];                     $poll_results_sum += $row['vote_result'];                 }                 while ( $row = $db->sql_fetchrow($result) );             }             $db->sql_freeresult($result);               $post_data['edit_poll'] = ( ( !$poll_results_sum || $is_auth['auth_mod'] ) && $post_data['first_post'] ) ? true : 0;         }         else         {             $post_data['edit_poll'] = ($post_data['first_post'] && $is_auth['auth_pollcreate']) ? true : false;         }                 //         // Can this user edit/delete the post/poll?         //         if ( $post_info['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod'] )         {             $message = ( $delete || $mode == 'delete' ) ? $lang['Delete_own_posts'] : $lang['Edit_own_posts'];             $message .= '<br><br>' . sprintf($lang['Click_return_topic'], '<a>', '</a>');               message_die(GENERAL_MESSAGE, $message);         }         else if ( !$post_data['last_post'] && !$is_auth['auth_mod'] && ( $mode == 'delete' || $delete ) )         {             message_die(GENERAL_MESSAGE, $lang['Cannot_delete_replied']);         }         else if ( !$post_data['edit_poll'] && !$is_auth['auth_mod'] && ( $mode == 'poll_delete' || $poll_delete ) )         {             message_die(GENERAL_MESSAGE, $lang['Cannot_delete_poll']);         }     }     else     {         if ( $mode == 'quote' )         {             $topic_id = $post_info['topic_id'];         }         if ( $mode == 'newtopic' )         {             $post_data['topic_type'] = POST_NORMAL;         }           $post_data['first_post'] = ( $mode == 'newtopic' ) ? true : 0;         $post_data['last_post'] = false;         $post_data['has_poll'] = false;         $post_data['edit_poll'] = false;     }     if ( $mode == 'poll_delete' && !isset($poll_id) )     {         message_die(GENERAL_MESSAGE, $lang['No_such_post']);     }       // BEGIN cmx_slash_news_mod     if( $board_config['allow_news'] && $post_data['first_post'] &&  $is_auth['auth_post'] &&         ($is_auth['auth_news'] || ( $is_auth['auth_mod'] && $mode == 'editpost') ) )     {         if( $mode == 'editpost' )         {             $post_data['news_id'] = $post_info['news_id'];         }         else         {             $post_data['news_id'] = 0;         }         $post_data['disp_news'] = true;     }     else     {         $post_data['disp_news'] = false;     }// END cmx_slash_news_mod}else{     message_die(GENERAL_MESSAGE, $lang['No_such_post']);}  //// The user is not authed, if they're not logged in then redirect// them, else show them an error message////-- mod : calendar --------------------------------------------------------------------------------// here we added//    || (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal])//-- modifyif ( !$is_auth[$is_auth_type] || (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal]) )//-- fin mod : calendar ----------------------------------------------------------------------------{     if ( $userdata['session_logged_in'] )     {//-- mod : calendar --------------------------------------------------------------------------------//-- add         if (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal])         {             message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type_cal], $is_auth[$is_auth_type_cal . "_type"]));         }//-- fin mod : calendar ----------------------------------------------------------------------------         message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type], $is_auth[$is_auth_type . "_type"]));     }       switch( $mode )     {         case 'newtopic':             $redirect = "mode=newtopic&" . POST_FORUM_URL . "=" . $forum_id;             break;         case 'reply':         case 'topicreview':             $redirect = "mode=reply&" . POST_TOPIC_URL . "=" . $topic_id;             break;         case 'quote':         case 'editpost':             $redirect = "mode=quote&" . POST_POST_URL ."=" . $post_id;             break;     }     $redirect .= ($post_reportid) ? '&post_reportid=$post_reportid' : '';     redirect(append_sid("login.$phpEx?redirect=posting.$phpEx&" . $redirect, true));}  //// Set toggles for various options//if ( !$board_config['allow_html'] ){     $html_on = 0;}else{     $html_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_html']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] );}  if ( !$board_config['allow_bbcode'] ){     $bbcode_on = 0;}else{     $bbcode_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_bbcode']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_bbcode'] : $userdata['user_allowbbcode'] );}  if ( !$board_config['allow_smilies'] ){     $smilies_on = 0;}else{     $smilies_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_smilies']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_smilies'] : $userdata['user_allowsmile'] );}  if ( ($submit || $refresh) && $is_auth['auth_read']){     $notify_user = ( !empty($HTTP_POST_VARS['notify']) ) ? TRUE : 0;}else{     if ( $mode != 'newtopic' && $userdata['session_logged_in'] && $is_auth['auth_read'] )     {         $sql = "SELECT topic_id             FROM " . TOPICS_WATCH_TABLE . "             WHERE topic_id = $topic_id                 AND user_id = " . $userdata['user_id'];         if ( !($result = $db->sql_query($sql)) )         {             message_die(GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql);         }           $notify_user = ( $db->sql_fetchrow($result) ) ? TRUE : $userdata['user_notify'];         $db->sql_freeresult($result);     }     else     {         $notify_user = ( $userdata['session_logged_in'] && $is_auth['auth_read'] ) ? $userdata['user_notify'] : 0;     }}  $attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_attachsig'] );$setbm = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['setbm']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_setbm'] );  execute_posting_attachment_handling();  //// Begin Approve_mod Block : 2//if ( $mode == 'newtopic' || $mode == 'reply' || $mode == 'editpost' || $mode == 'quote' ){     $approve_mod = array();     $approve_mod['notify'] = false;     $approve_sql = "SELECT *         FROM " . APPROVE_FORUMS_TABLE . "         WHERE forum_id = " . intval($forum_id);     if ( !($approve_result = $db->sql_query($approve_sql)) )     {         message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);     }     if ( $approve_row = $db->sql_fetchrow($approve_result) )     {         if ( intval($approve_row['enabled']) == 1 )         {             $approve_mod = $approve_row;             $approve_mod['enabled'] = true;         }     }     $approve_mod['moderators'] = array();     $approve_mod['moderators'] = explode('|', $approve_mod['approve_moderators']);     if ( in_array($userdata['user_id'], $approve_mod['moderators']) || $is_auth['auth_mod'] )     {         //moderator, don't screen their post         $approve_mod['enabled'] = false;     }         if ( $approve_mod['enabled'] )     {         if ( $approve_mod['forum_hide_unapproved_posts'] )         {             $lang['Stored'] = $lang['approve_admin_Stored_replacement'];         }         //         // Check if quoted post is approved         //         if ( $mode == 'quote' )         {             // patch purpose proposed by Markus Rietzler <markus>             // check if the quoted post has been approved, if so, empty the quote text             $approve_sql = "SELECT *                     FROM " . APPROVE_POSTS_TABLE . "                     WHERE post_id = " . intval($post_id) . "                         AND is_post = 1";             if ( !($approve_result = $db->sql_query($approve_sql)) )             {                 message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);             }             if ( $approve_row = $db->sql_fetchrow($approve_result) )             {                 //quoted post is not approved                 $approve_mod['quoted_post_not_approved'] = true;             }         }           //         // Check user and topic moderation         //         if ( $approve_mod['approve_users'] )         {             //all users & topics, let's check them to see if we should disable moderation             if ( $approve_mod['approve_posts'] && $mode != 'newtopic' )             {                 $approve_sql = "SELECT approve_moderate                     FROM " . APPROVE_TOPICS_TABLE . "                     WHERE topic_id = " . intval($topic_id) . "                         AND approve_moderate = -1                     LIMIT 0,1";                 if ( !($approve_result = $db->sql_query($approve_sql)) )                 {                     message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);                 }                 if ( $approve_row = $db->sql_fetchrow($approve_result) )                 {                     if ( intval($approve_row['approve_moderate']) == -1 )                     {                         //topic auto-approved                         $approve_mod['enabled'] = false;                     }                 }             }             if ( $approve_mod['enabled'] )             {                 $approve_sql = "SELECT approve_moderate                     FROM " . APPROVE_USERS_TABLE . "                     WHERE user_id = " . intval($userdata['user_id']) . "                         AND approve_moderate = -1                     LIMIT 0,1";                 if ( !($approve_result = $db->sql_query($approve_sql)) )                 {                     message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);                 }                 if ( $approve_row = $db->sql_fetchrow($approve_result) )                 {                     if ( intval($approve_row['approve_moderate']) == -1 )                     {                         //user auto-approved                         $approve_mod['enabled'] = false;                     }                 }             }         }         else         {             //only selected topics, let's check them to see if we should turn on moderation             $approve_mod['enabled'] = false;             $approve_sql = "SELECT *                 FROM " . APPROVE_TOPICS_TABLE . "                 WHERE topic_id = " . intval($topic_id) . "                 LIMIT 0,1";             if ( !($approve_result = $db->sql_query($approve_sql)) )             {                 message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);             }             if ( $approve_row = $db->sql_fetchrow($approve_result) )             {                 if ( intval($approve_row['approve_moderate']) == 1 )                 {                     //topic is moderated                     $approve_mod['enabled'] = true;                 }             }         }         //check the user to see if we should still moderate them, regardless of topic settings         if ( !$approve_mod['enabled'] )         {             $approve_sql = "SELECT *                 FROM " . APPROVE_USERS_TABLE . "                 WHERE user_id = " . intval($userdata['user_id']) . "                 LIMIT 0,1";             if ( !($approve_result = $db->sql_query($approve_sql)) )             {                 message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);             }             if ( $approve_row = $db->sql_fetchrow($approve_result) )             {                 if ( intval($approve_row['approve_moderate']) == 1 )                 {                     //user is moderated                     $approve_mod['enabled'] = true;                 }             }         }         if ( $approve_mod['enabled'] )         {             //check admin settings for what to allow & what to moderate             switch ($mode)             {                 case 'newtopic':                     if ( intval($approve_mod['approve_topics']) != 1 )                     {                         //new topics are not moderated                         $approve_mod['enabled'] = false;                     }                 break;                                 case 'reply':                 case 'quote':                     if ( intval($approve_mod['approve_posts']) != 1 )                     {                         //new replies are not moderated                         $approve_mod['enabled'] = false;                     }                 break;                                 case 'editpost':                     if ( intval($approve_mod['approve_poste']) != 1 )                     {                         //post edits are not moderated                         $approve_mod['enabled'] = false;                     }                     $approve_mod_post_id = ($HTTP_GET_VARS[POST_POST_URL]) ? $HTTP_GET_VARS[POST_POST_URL] : $HTTP_POST_VARS[POST_POST_URL];                     if ( !$approve_mod['enabled'] && ( intval($approve_mod['approve_topice']) == 1 ) && !empty($approve_mod_post_id) )                     {                         //let's see if it's a topic and if so, turn moderation back on                         $approve_sql = "SELECT t.topic_first_post_id                             FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p                             WHERE p.post_id = " . intval($approve_mod_post_id) . "                                 AND t.topic_id = p.topic_id                             LIMIT 0,1";                         if ( !($approve_result = $db->sql_query($approve_sql)) )                         {                             message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);                         }                         if ( $approve_row = $db->sql_fetchrow($approve_result) )                         {                             if ( intval($approve_row['topic_first_post_id']) == intval($approve_mod_post_id) )                             {                                 //topic edits are moderated                                 $approve_mod['enabled'] = true;                             }                         }                     }                 break;             }         }     }}//// End Approve_mod Block : 2//  // BEGIN cmx_slash_news_mod//// Get News Categories.//if( $userdata['session_logged_in'] && $post_data['disp_news'] ){     if ( $mode == 'edit' && empty($post_id) )     {         message_die(GENERAL_MESSAGE, $lang['No_post_id']);     }      $sql = 'SELECT n.* FROM ' . NEWS_TABLE . ' n WHERE 1 ORDER BY n.news_category';       if ( !($result = $db->sql_query($sql)) )     {         message_die(GENERAL_ERROR, 'Could not obtain news data', '', __LINE__, __FILE__, $sql);     }       $news_sel = array();     $news_cat = array();     while ( $row = $db->sql_fetchrow($result) )     {         if( ($news_category > 0 && $news_category == $row['news_id']) ||             ($post_data['news_id'] > 0 && $post_data['news_id'] == $row['news_id']) )         {                 $news_sel = $row;         }                 if( $post_data['news_id'] != 0 && $post_data['news_id'] == $row['news_id'] )         {             $news_sel = $row;         }         $news_cat[] = $row;     }         if( $post_data['news_id'] == 0 && $news_category == 0)     {         $boxstring = '<option>' . $lang['Regular_Post'] . '</option>';     }     else     {         $boxstring = '<option>' . $news_sel['news_category'] . ' (' . $lang['Current_Selection'] . ')</option>';         $boxstring .= '<option>' . $lang['Regular_Post'] . '</option>';     }       if( count( $news_cat ) > 0 )     {         for( $i = 0; $i </option>assign_block_vars('switch_news_cat', array(             'L_NEWS_CATEGORY' => $lang['Select_News_Category'],             'S_NAME' => 'news_category',             'S_CATEGORY_BOX' => $boxstring         ));     }}// END cmx_slash_news_mod  // --------------------//  What shall we do?//if ( ( $delete || $poll_delete || $mode == 'delete' ) && !$confirm ){     //     // Confirm deletion     //     $s_hidden_fields = '<input>';     $s_hidden_fields .= ( $delete || $mode == "delete" ) ? '<input>' : '<input>';       $l_confirm = ( $delete || $mode == 'delete' ) ? $lang['Confirm_delete'] : $lang['Confirm_delete_poll'];       //     // Output confirmation page     //     include($phpbb_root_path . 'includes/page_header.'.$phpEx);       $template->set_filenames(array(         'confirm_body' => 'confirm_body.tpl')     );       $template->assign_vars(array(         'MESSAGE_TITLE' => $lang['Information'],         'MESSAGE_TEXT' => $l_confirm,           'L_YES' => $lang['Yes'],         'L_NO' => $lang['No'],           'S_CONFIRM_ACTION' => append_sid("posting.$phpEx"),         'S_HIDDEN_FIELDS' => $s_hidden_fields)     );       $template->pparse('confirm_body');       include($phpbb_root_path . 'includes/page_tail.'.$phpEx);}else if ( $mode == 'vote' ){     //     // Vote in a poll     //         if ( (!empty($HTTP_POST_VARS['vote_id'])) and (is_array($HTTP_POST_VARS['vote_id'])) and (isset($HTTP_POST_VARS['vote_id'])) )     {         $vote_option_id = intval($HTTP_POST_VARS['vote_id']);         $vote_id = $HTTP_POST_VARS['vote_id'];         $sql = "SELECT vd.vote_id, vd.vote_max                 FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr             WHERE vd.topic_id = $topic_id                 AND vr.vote_id = vd.vote_id                 AND vr.vote_option_id = $vote_option_id             GROUP BY vd.vote_id";         if ( !($result = $db->sql_query($sql)) )         {             message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);         }           if ( $vote_info = $db->sql_fetchrow($result) )         {             $max_vote = $vote_info['vote_max'];         }         $max_voting=count($vote_id);         if ($max_voting>$max_vote)         {             $max_voting=$max_vote;         }         for($i = 0; $i <max_voting>sql_query($sql)) )         {             message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);         }           if ( $vote_info = $db->sql_fetchrow($result) )         {             $vote_id = $vote_info['vote_id'];               $sql = "SELECT *                 FROM " . VOTE_USERS_TABLE . "                   WHERE vote_id = $vote_id                     AND vote_user_id = " . $userdata['user_id'];             if ( !($result2 = $db->sql_query($sql)) )             {                 message_die(GENERAL_ERROR, 'Could not obtain user vote data for this topic', '', __LINE__, __FILE__, $sql);             }               if ( !($row = $db->sql_fetchrow($result2)) )             {               for($i = 0; $i <max_voting>sql_query($sql, BEGIN_TRANSACTION) )                 {                     message_die(GENERAL_ERROR, 'Could not update poll result', '', __LINE__, __FILE__, $sql);                 }               }                 $sql = "UPDATE " . VOTE_DESC_TABLE . "                     SET vote_voted = vote_voted + 1                     WHERE vote_id = $vote_id                         AND topic_id = $topic_id";                 if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )                 {                     message_die(GENERAL_ERROR, 'Could not update poll voted', '', __LINE__, __FILE__, $sql);                 }                   $sql = "INSERT INTO " . VOTE_USERS_TABLE . " (vote_id, vote_user_id, vote_user_ip)                     VALUES ($vote_id, " . $userdata['user_id'] . ", '$user_ip')";                 if ( !$db->sql_query($sql, END_TRANSACTION) )                 {                     message_die(GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql);                 }                   $message = $lang['Vote_cast'];             }             else             {                 $message = $lang['Already_voted'];             }             $db->sql_freeresult($result2);         }         else         {             $message = $lang['No_vote_option'];         }         $db->sql_freeresult($result);           $template->assign_vars(array(             'META' => '<meta>')         );         $message .=  '<br><br>' . sprintf($lang['Click_view_message'], '<a>', '</a>');         message_die(GENERAL_MESSAGE, $message);     }     else     {         redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));     }}else if ( $submit || $confirm ){     //     // Submit post/vote (newtopic, edit, reply, etc.)     //     $return_message = '';     $return_meta = '';       switch ( $mode )     {         case 'editpost':         case 'newtopic':         case 'reply':             $username = ( !empty($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : '';             $subject = ( !empty($HTTP_POST_VARS['subject']) ) ? trim($HTTP_POST_VARS['subject']) : '';             $topic_desc = ( !empty($HTTP_POST_VARS['topic_desc']) ) ? trim($HTTP_POST_VARS['topic_desc']) : '';             $message = ( !empty($HTTP_POST_VARS['message']) ) ? $HTTP_POST_VARS['message'] : '';//-- mod : calendar --------------------------------------------------------------------------------//-- add             $topic_calendar_time = ( $topic_calendar_time != $post_data['topic_calendar_time'] && !$is_auth['auth_cal']) ? $post_data['topic_calendar_time'] : $topic_calendar_time;             if (empty($topic_calendar_time)) $topic_calendar_time = 0;// repeat             $repeat_mode = $post_info['topic_calendar_repeat'];             if($repeat_mode)             {                 $repeat_type = substr($repeat_mode,0,2);                 $repeat_type_value = substr($repeat_mode,2,2);             }             $topic_calendar_repeats = ( !empty($HTTP_POST_VARS['topic_calendar_repeats']) ) ? trim($HTTP_POST_VARS['topic_calendar_repeats']) : '';             $topic_calendar_repeats_value = ( !empty($HTTP_POST_VARS['topic_calendar_repeats_value']) ) ? trim($HTTP_POST_VARS['topic_calendar_repeats_value']) : '';             if(intval($topic_calendar_repeats_value)==0 || !($topic_calendar_repeats=='DD' || $topic_calendar_repeats=='MT' || $topic_calendar_repeats=='MY' || $topic_calendar_repeats=='WW' || $topic_calendar_repeats=='YY') )             {                 $topic_calendar_repeat = '';             }else             {                 $topic_calendar_repeat = $topic_calendar_repeats . $topic_calendar_repeats_value;             }             $topic_calendar_duration = ( $topic_calendar_duration != $post_data['topic_calendar_duration'] && !$is_auth['auth_cal']) ? $post_data['topic_calendar_duration'] : $topic_calendar_duration;             if ( !empty($topic_calendar_duration) )             {                 $topic_calendar_duration--;             }             if (empty($topic_calendar_time) || empty($topic_calendar_duration)) $topic_calendar_duration = 0;//-- fin mod : calendar ----------------------------------------------------------------------------             $poll_title = ( isset($HTTP_POST_VARS['poll_title']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_title'] : '';             $poll_options = ( isset($HTTP_POST_VARS['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_option_text'] : '';             $poll_length = ( isset($HTTP_POST_VARS['poll_length']) && $is_auth['auth_pollcreate'] ) ? intval($HTTP_POST_VARS['poll_length']) : '0';             $poll_length_h = ( isset($HTTP_POST_VARS['poll_length_h']) && $is_auth['auth_pollcreate'] ) ? intval($HTTP_POST_VARS['poll_length_h']) : '0';             $poll_length = $poll_length*24;             $poll_length = $poll_length_h+$poll_length;             $poll_length = ($poll_length) ? max(0, ($poll_length/24)) : 0;             $max_vote = ( isset($HTTP_POST_VARS['max_vote']) && $is_auth['auth_pollcreate'] ) ? ( ( $HTTP_POST_VARS['max_vote'] == 0 ) ? 1 : $HTTP_POST_VARS['max_vote'] ) : '';             $hide_vote = ( isset($HTTP_POST_VARS['hide_vote']) && $is_auth['auth_pollcreate'] && ($poll_length>0) ) ? 1 : '';             $tothide_vote = ( isset($HTTP_POST_VARS['tothide_vote']) && isset($HTTP_POST_VARS['hide_vote']) && $is_auth['auth_pollcreate'] && ($poll_length>0) ) ? 1 : '';             $bbcode_uid = '';               //-----------------------------------------------------------------------------             // MOD: Delayed Topics               // If we're trying to delay (force time), check for rights...             $forcetime = '';             if (isset($HTTP_POST_VARS['forcetime']) && trim($HTTP_POST_VARS['forcetime']) != '')             {                 if (!$is_auth['auth_delayedpost'])                 {                     message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type], $is_auth[$is_auth_type . "_type"]));                 }                 else                 {                     $forcetime = strtotime($HTTP_POST_VARS['forcetime']);                     user2boardtime($forcetime);                     if (($forcetime == -1) || ($forcetime < time()))                     {                         $forcetime = '';                     }                 }             }               // MOD: Delayed Topics {end}             //-----------------------------------------------------------------------------  //-- mod : calendar --------------------------------------------------------------------------------// here we have added//   , $topic_calendar_time, $topic_calendar_duration//-- modify prepare_post only             prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length, $max_vote, $hide_vote, $tothide_vote, $topic_desc, $topic_calendar_time, $topic_calendar_duration, $topic_calendar_repeat );//-- fin mod : calendar ----------------------------------------------------------------------------               if ( $error_msg == '' )             {                 $topic_type = ( $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type;//-- mod : announces -------------------------------------------------------------------------------//-- add                 if ($topic_announce_duration </a>sql_query($approve_sql)) )                         {                             message_die(GENERAL_ERROR, $lang['approve_posts_error_insert'], '', __LINE__, __FILE__, $approve_sql);                         }                         if ( $approve_mod['approve_notify_topics'] )                         {                             $approve_mod['notify'] = true;                         }                     }                     elseif ( $mode == 'reply' && $approve_mod['approve_posts'] )                     {                         $approve_sql = "INSERT INTO " . APPROVE_POSTS_TABLE . " (post_id, topic_id, is_post, poster_id)                             VALUES (" . intval($post_id) . ", " . intval($topic_id) . ", 1, " . intval($userdata['user_id']) . ")";                         if ( !($approve_result = $db->sql_query($approve_sql)) )                         {                             message_die(GENERAL_ERROR, $lang['approve_posts_error_insert'], '', __LINE__, __FILE__, $approve_sql);                         }                         if ( $approve_mod['approve_notify_posts'] )                         {                             $approve_mod['notify'] = true;                         }                     }                     elseif ( $mode == 'editpost' )                     {                         $approve_mod['topic_or_post'] = 'is_post';                    
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Thu Apr 20, 2006 1:05 am

hi

can you place a zip file or a txt file so ican compare you posting.php as the site has screwed up your copy....

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: Eon » Thu Apr 20, 2006 6:51 am

Not to be nit picky or anything, b ut wouldn't it be beneficial to add the functions_post.php edit for the quotes into the install.txt file and into the pre-modded files?

That is the only fix I had to do when I installed it on my main site.

That way people just download the pack and install and be done.

<img>
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: gcomfx.com » Thu Apr 20, 2006 6:56 am

"Eon";p="2400" wrote:Not to be nit picky or anything, b ut wouldn't it be beneficial to add the functions_post.php edit for the quotes into the install.txt file and into the pre-modded files?

That is the only fix I had to do when I installed it on my main site.

That way people just download the pack and install and be done.

<img>


Is that the fix for my problem? If so, do you have a link?
Last edited by gcomfx.com on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Paul (gcomfx) - 100mphclub.com originator
[size=99px]
User avatar
gcomfx.com
Sr Integra Member
Sr Integra Member
 
Posts: 251
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:34 am
Cash on hand: 0.00

PostAuthor: found it » Thu Apr 20, 2006 9:41 am

[quote=""Eon";p="2400""]Not to be nit picky or anything, b ut wouldn't it be beneficial to add the functions_post.php edit for the quotes into the install.txt file and into the pre-modded files?

That is the only fix I had to do when I installed it on my main site.

That way people just download the pack and install and be done.

:mrgreen: <img>
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: found it » Thu Apr 20, 2006 9:43 am

"gcomfx.com";p="2401" wrote:
"Eon";p="2400" wrote:Not to be nit picky or anything, b ut wouldn't it be beneficial to add the functions_post.php edit for the quotes into the install.txt file and into the pre-modded files?

That is the only fix I had to do when I installed it on my main site.

That way people just download the pack and install and be done.

<img>


Is that the fix for my problem? If so, do you have a link?


http://integramod.com/forum/viewtopic.php?p=1592#1592
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Threat009 » Thu Apr 20, 2006 11:11 am

"found it";p="2365" wrote:hi

can you place a zip file or a txt file so ican compare you posting.php as the site has screwed up your copy....

:mrgreen:

Thanks for taking the time to compare. I'm not sure why no one else has had this problem yet, but I'm guessing it may have something to do w/a mod I've installed in the past.

[url=http]posting.php.zip[/url]
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

PostAuthor: gcomfx.com » Thu Apr 20, 2006 11:14 am

I have HTML off, but I'll try that fix and see if it helps.

Edit: That line is already in the functions_post.php

Or are you pointing me to something else? <img>
Last edited by gcomfx.com on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Paul (gcomfx) - 100mphclub.com originator
[size=99px]
User avatar
gcomfx.com
Sr Integra Member
Sr Integra Member
 
Posts: 251
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:34 am
Cash on hand: 0.00

PostAuthor: gcomfx.com » Thu Apr 20, 2006 2:27 pm

Also have you guys quoted anyone with images yet?

http://100mphclub.com/community/viewtop ... 2914#32914

The quote is not expanded, but takes the space as if it were. <img>
Last edited by gcomfx.com on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Paul (gcomfx) - 100mphclub.com originator
[size=99px]
User avatar
gcomfx.com
Sr Integra Member
Sr Integra Member
 
Posts: 251
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:34 am
Cash on hand: 0.00

PostAuthor: found it » Thu Apr 20, 2006 2:37 pm

[quote=""gcomfx.com";p="2477""]Also have you guys quoted anyone with images yet?

http://100mphclub.com/community/viewtop ... 2914#32914

The quote is not expanded, but takes the space as if it were. :mrgreen: <img>
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: Eon » Fri Apr 21, 2006 5:30 am

I was going to say the same thing Found it.

I wasn't being bossy Found it. I could do the changes and stuff if you are asking for help.

<img>

Also, the bbcode.php in the zip file, is that the one we are supposed to use if we are using the premodded files?

gcomfx.com---

At that thread, there is a line to find, then a line to add I believe. Did you use the premodded files or make the changes manually?

If you downloaded a version before the bbcode.php was fixed, and you used it, then there is a fix in it as well.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Fri Apr 21, 2006 5:46 am

"Threat009";p="2446" wrote:
"found it";p="2365" wrote:hi

can you place a zip file or a txt file so ican compare you posting.php as the site has screwed up your copy....

:mrgreen:

Thanks for taking the time to compare. I'm not sure why no one else has had this problem yet, but I'm guessing it may have something to do w/a mod I've installed in the past.

[url=http]posting.php.zip[/url]


Hi

your posting.php file is showing exactly the same as mine...have you added any mods to your site that need to be added in posting.php....?

let me know what mods you have added andwe can see if we can find the problem

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: gcomfx.com » Fri Apr 21, 2006 7:26 am

"found it";p="2479" wrote:
"gcomfx.com";p="2477" wrote:Also have you guys quoted anyone with images yet?

http://100mphclub.com/community/viewtop ... 2914#32914

The quote is not expanded, but takes the space as if it were. :mrgreen: <img>


Nope, apparently it's a new issue with Safari since the upgrade. And right after the upgrade to Safari finally fixed the add a smilie or BBcode from the button menus. LOL Oh well, I would rather have this problem than the other.
Last edited by gcomfx.com on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Paul (gcomfx) - 100mphclub.com originator
[size=99px]
User avatar
gcomfx.com
Sr Integra Member
Sr Integra Member
 
Posts: 251
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:34 am
Cash on hand: 0.00

PostAuthor: gcomfx.com » Fri Apr 21, 2006 7:33 am

"Eon";p="2548" wrote:gcomfx.com---

At that thread, there is a line to find, then a line to add I believe. Did you use the premodded files or make the changes manually?

If you downloaded a version before the bbcode.php was fixed, and you used it, then there is a fix in it as well.


I downloaded the file and installed it right before I posted. I used the premodded files. That manual stuff makes my head spin. <img>

So I need to download it again and then extract and install the bbcode.php in the zip file inside the download now?
Last edited by gcomfx.com on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Paul (gcomfx) - 100mphclub.com originator
[size=99px]
User avatar
gcomfx.com
Sr Integra Member
Sr Integra Member
 
Posts: 251
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:34 am
Cash on hand: 0.00

PostAuthor: Eon » Fri Apr 21, 2006 8:49 am

Is the zip file the fixed bbcode file Found it?
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: found it » Fri Apr 21, 2006 9:02 am

"Eon";p="2569" wrote:Is the zip file the fixed bbcode file Found it?


yes it is and the extra fix is included in fuctions_post.php

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Threat009 » Fri Apr 21, 2006 9:12 am

"Threat009";p="2446" wrote:
[url=http]posting.php.zip[/url]


bump* Can anyone help w/this issue? Forums are totally down. No news, posting, quoting, nothing. Any attempt results in Parse error: parse error, unexpected $ in posting.php on line 1339
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

PostAuthor: Eon » Fri Apr 21, 2006 10:58 am

Do you have a backup of your posting.php before you applied the edits?

Although due to the fact that there is only 1 small edit in posting.php I am guessing that is not the real problem. At least not in that file.

I would put your backups back in place for the mean time until this can be sorted out.

Also, if you have kept up with what mods you have installed and what files were editted for those mods, you can go through and drop the pre-modded files into place that were not changed from the stock IM 140 with phpbb2.0.19 and phpbb security 1.03.

Then just make the changes to the files that were editted from mods or bug fixes.


That is what I did, was a lot quicker.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Fri Apr 21, 2006 12:16 pm

"Threat009";p="2574" wrote:
"Threat009";p="2446" wrote:
[url=http]posting.php.zip[/url]


bump* Can anyone help w/this issue? Forums are totally down. No news, posting, quoting, nothing. Any attempt results in Parse error: parse error, unexpected $ in posting.php on line 1339


Hi I responded to your post a few hours ago here

http://integramod.com/forum/viewtopic.php?p=2551#2551

but you didnt go back a page in this topic....

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: Threat009 » Fri Apr 21, 2006 1:54 pm

"Eon";p="2590" wrote:Do you have a backup of your posting.php before you applied the edits?

Although due to the fact that there is only 1 small edit in posting.php I am guessing that is not the real problem. At least not in that file.

I would put your backups back in place for the mean time until this can be sorted out.

Also, if you have kept up with what mods you have installed and what files were editted for those mods, you can go through and drop the pre-modded files into place that were not changed from the stock IM 140 with phpbb2.0.19 and phpbb security 1.03.

Then just make the changes to the files that were editted from mods or bug fixes.


That is what I did, was a lot quicker.

An excellent suggestion. I overwrote all of my manual files w/the premodded ones and that seems to have done the trick! I have a folder that I keep all mods and add-ons in, so I did a search in that folder for any of the premodded files, and none were found so I got lucky on that one. I don't quite understand why the manual edits involve memberlist.php and posting.php but the pre-modded folder does not have them. :)
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

PostAuthor: Eon » Fri Apr 21, 2006 2:42 pm

I believe the bbcode.php that is included in the zip file is the correct one to use. And no it will not cause any problems just replacing the one you have with the new one. Unless of course you have made a mod to it since you dropped it in.

Make sure your quotes and everything work.

Otherwise happy forum whoring!
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: Threat009 » Sat Apr 22, 2006 1:44 pm

"Eon";p="2596" wrote:I believe the bbcode.php that is included in the zip file is the correct one to use. And no it will not cause any problems just replacing the one you have with the new one. Unless of course you have made a mod to it since you dropped it in.

Make sure your quotes and everything work.

Otherwise happy forum whoring!

Overwrote the file, tested quote/s, everything seems to be running smoothly. Thanks to E1 for the assist! <img>
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: RedRobin » Sat Apr 22, 2006 1:50 pm

Hi everyone!

I guess the quickest way to install and update your portal (stock) is by doing the following steps below in strict order:

[list type=decimal][*]IntegraMOD 140
[*]phpBB 2.0.17 to 2.0.19 Integramod 140
[*]phpBB Security 1.02 to 1.03 IM 140
[*]phpBB 2.0.19 to 2.0.20 Integramod 140
[*]Apply the fix on your integraMOD-root/admin/admin_ranks.php if you used the ZIP file with pre-modded files.[/list]


As stated by found it, the correct code in admin_ranks.php should be]         $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm )[/code]

I suggest that all files should be core and un-modded before upgrading. It is much easier that way. I have success in updating my test site using these procedures. In the end, it should give you these results at your ACP:

[url=http][flash=,:nnokexpr]http://img65.imageshack.us/img65/6797/untitled4ab.jpg[/flash:nnokexpr][/url]

That's it! I hope you find my post informative. I'm new here and an amateur when it comes to PHP but I'm having a good start in contributing to this community.

<img>
Last edited by RedRobin on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
RedRobin
Newbie
Newbie
 
Posts: 4
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 22, 2006 12:44 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: RedRobin » Sat Apr 22, 2006 2:00 pm

Also, I would like to add that I didn't edit a single file (except for the fix in admin_ranks.php) in my process of upgrading my integraMOD site.

All the ZIP files that I downloaded have "premodded folders". I only upload all the files within these folders to my server, overwriting the old ones before executing the installer for database updates.

These are all fresh installs. No "other" mods included. If this is your case, there should be no problem.

<img>
Last edited by RedRobin on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
RedRobin
Newbie
Newbie
 
Posts: 4
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 22, 2006 12:44 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Threat009 » Sat Apr 22, 2006 2:28 pm

My site seems to be running fine, but this is starting to get a little confusing. If we are supposed to use bbcode.zip why is bbcode.php even included in the premodded folder? I guess that doesn't matter so long as everyone knows to use the .zip file, but than I read that if I use the .zip, which sounds like I had a choice, than apply fix to admin_ranks.php

WoW! This is one confusing update! Can someone confirm, Is premodded files/admin/admin_ranks.php correct? Or does it need an edit when you use bbcode.zip? :?
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Sat Apr 22, 2006 2:44 pm

"Threat009";p="2687" wrote:My site seems to be running fine, but this is starting to get a little confusing. If we are supposed to use bbcode.zip why is bbcode.php even included in the premodded folder? I guess that doesn't matter so long as everyone knows to use the .zip file, but than I read that if I use the .zip, which sounds like I had a choice, than apply fix to admin_ranks.php

WoW! This is one confusing update! Can someone confirm, Is premodded files/admin/admin_ranks.php correct? Or does it need an edit when you use bbcode.zip? :?


Hi

Sorry if the files got confusing ....lol they did for me uploading them.....ignore the bbcode zip...that ws on my comp but got loaded up.....

the fix (admin_rank.php) does need to be applied when using the premodded files as i made an error.....

if your site is working as it dhould then i would not worry.....

Again sorry for any confusion it was not the easiest of updates to do.....

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Threat009 » Sat Apr 22, 2006 3:04 pm

Thankyou for confirming :mrgreen:
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

PostAuthor: Eon » Mon Apr 24, 2006 12:34 pm

I just noticed this, but my button in the ACP that goes to Ranks is not there any more. And I applied the fix to admin_ranks.php.

And also my quotes have quit working again. Made no changes at all.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: Thug Lyfe » Mon Apr 24, 2006 4:53 pm

After seeing all these errors...i'm really scared because i'll most likely screw up lol. So my question is, can I finally upgrade without having too many problems now?
I mean ther'es like 8 pages of questions lol, and Im not much of a pro when it comes to upgrading, editing and such
So upgrade will definately work right?
Last edited by Thug Lyfe on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Thug Lyfe
Members
Members
 
Posts: 30
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 2:09 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: sirap » Mon Apr 24, 2006 5:09 pm

hi, just upgraded using premodded files..but I got this error when try to change user password in admin ACP.

phpBB : Critical Error

Error removing auto-login keys

DEBUG MODE

SQL Error : 1146 Table 'forumdb.SESSIONS_KEYS_TABLE' doesn't exist

DELETE FROM SESSIONS_KEYS_TABLE WHERE user_id = 242

Line : 533
File : sessions.php

Is anyone got the solution?
This is my sessions.php

Code: Select all
 <?php^M/***************************************************************************^M  *                                sessions.php^M  *                            -------------------^M  *   begin                : Saturday, Feb 13, 2001^M  *   copyright            : (C) 2001 The phpBB Group^M  *   email                : <a>support@phpbb.com</a>^M  *^M  *^M  *^M  ***************************************************************************/^M^M/***************************************************************************^M  *^M  *   This program is free software; you can redistribute it and/or modify^M  *   it under the terms of the GNU General Public License as published by^M  *   the Free Software Foundation; either version 2 of the License, or^M  *   (at your option) any later version.^M  *^M  ***************************************************************************/^M^M//^M// Adds/updates a new session to the database for the given userid.^M// Returns the new session ID on success.^M//^Mfunction session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0)^M{^M         global $db, $board_config;^M         global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;^M^M         $cookiename = $board_config['cookie_name'];^M         $cookiepath = $board_config['cookie_path'];^M         $cookiedomain = $board_config['cookie_domain'];^M         $cookiesecure = $board_config['cookie_secure'];^M^M         if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )^M         {^M                 $session_id = isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';^M                 $sessiondata = isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();^M                 $sessionmethod = SESSION_METHOD_COOKIE;^M         }^M         else^M         {^M                 $sessiondata = array();^M                 $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';^M                 $sessionmethod = SESSION_METHOD_GET;^M         }^M^M         if (!preg_match('/^[A-Za-z0-9]*$/', $session_id)) ^M         {^M                 $session_id = '';^M         }^M         ^M         $page_id = (int) $page_id;^M^M         global $HTTP_SERVER_VARS; ^M         if ( empty($session_id)  && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ^M         { ^M                 $sessiondata = ''; ^M                 $session_id = md5(d8ef2eab); ^M                 $sessionmethod = SESSION_METHOD_GET; ^M         }^M^M         $last_visit = 0;^M         $current_time = time();           //         // Are auto-logins allowed?         // If allow_autologin is not set or is true then they are         // (same behaviour as old 2.0.x session code)         //         if (isset($board_config['allow_autologin']) && !$board_config['allow_autologin'])         {                 $enable_autologin = $sessiondata['autologinid'] = false;         }           //         // First off attempt to join with the autologin value if we have one         // If not, just use the user_id value         //         $userdata = array();         if ($user_id != ANONYMOUS)         {         //-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------                        ^M//-- add^M                 lw_check_membership($userdata);^M//-- fin mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------                    ^M^M                 if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '' && $user_id)                 {                         $sql = 'SELECT u.*                                FROM ' . USERS_TABLE . ' u, ' . SESSIONS_KEYS_TABLE . ' k                                WHERE u.user_id = ' . (int) $user_id . "                                        AND u.user_active = 1                                        AND k.user_id = u.user_id                                        AND k.key_id = '" . md5($sessiondata['autologinid']) . "'";                         if (!($result = $db->sql_query($sql)))                         {                                 message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                         }                           $userdata = $db->sql_fetchrow($result);                         $db->sql_freeresult($result);                           $enable_autologin = $login = 1;                 }                 else if (!$auto_create)                 {                         $sessiondata['autologinid'] = '';                         $sessiondata['userid'] = $user_id;                           $sql = 'SELECT *                                FROM ' . USERS_TABLE . '                                WHERE user_id = ' . (int) $user_id . '                                        AND user_active = 1';                         if (!($result = $db->sql_query($sql)))                         {                                 message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                         }                           $userdata = $db->sql_fetchrow($result);                         $db->sql_freeresult($result);                         $login = 1;                 }         }           //         // At this point either $userdata should be populated or         // one of the below is true         // * Key didn't match one in the DB         // * User does not exist         // * User is inactive         //         if (!sizeof($userdata) || !is_array($userdata) || !$userdata)         {                 $sessiondata['autologinid'] = '';                 $sessiondata['userid'] = $user_id = ANONYMOUS;                 $enable_autologin = $login = 0;                   $sql = 'SELECT *                        FROM ' . USERS_TABLE . '                        WHERE user_id = ' . (int) $user_id;                 if (!($result = $db->sql_query($sql)))                 {                         message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                 }                   $userdata = $db->sql_fetchrow($result);                 $db->sql_freeresult($result);         }^M         //^M         // Initial ban check against user id, IP and email address^M         //^M         preg_match('/(..)(..)(..)(..)/', $user_ip, $user_ip_parts);^M^M         $sql = "SELECT ban_ip, ban_userid, ban_email ^M                FROM " . BANLIST_TABLE . " ^M                WHERE ban_ip IN ('" . $user_ip_parts[1] . $user_ip_parts[2] . $user_ip_parts[3] . $user_ip_parts[4] . "', '" . $user_ip_parts[1] . $user_ip_parts[2] . $user_                         OR ban_userid = $user_id";^M        if ( $user_id != ANONYMOUS )^M        {^M                $sql .= " OR ban_email LIKE '" . str_replace("'", "''", $userdata['user_email']) . "' ^M                         OR ban_email LIKE '" . substr(str_replace("'", "''", $userdata['user_email']), strpos(str_replace("'", "''", $userdata['user_email']), "@")) . "'";        }^M        if ( !($result = $db->sql_query($sql)) )^M        {^M                message_die(CRITICAL_ERROR, 'Could not obtain ban information', '', __LINE__, __FILE__, $sql);^M        }^M^M        if ( $ban_info = $db->sql_fetchrow($result) )^M        {^M                if ( $ban_info['ban_ip'] || $ban_info['ban_userid'] || $ban_info['ban_email'] )^M                {^M                        message_die(CRITICAL_MESSAGE, 'You_been_banned');^M                }^M        }^M^M        //^M        // Create or update the session^M        //^M        $sql = "UPDATE " . SESSIONS_TABLE . "^M                 SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login, session_adm                 WHERE session_id = '" . $session_id . "' ^M                         AND session_ip = '$user_ip'";^M        if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )^M        {^M                        $session_id = md5(dss_rand());^M                ^M                global $HTTP_SERVER_VARS; ^M                $session_id = ( !strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ? md5(uniqid(mt_rand(), true)) : md5(d8ef2eab);^M^M                $sql = "INSERT INTO " . SESSIONS_TABLE . "^M                         (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin)^M                         VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin)";^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);^M                }^M        }^M^M        if ( $user_id != ANONYMOUS )^M        {                $last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time; ^M               ^M                if (!$admin)^M                {^M^M                $sql = "UPDATE " . USERS_TABLE . " ^M                         SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit^M                         WHERE user_id = $user_id";^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);^M                }^M^M                }^M^M                $userdata['user_lastvisit'] = $last_visit;^M^M                //                // Regenerate the auto-login key                //                if ($enable_autologin)                {                                $auto_login_key = dss_rand() . dss_rand();                          if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '')                        {                                $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . "                                         SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time                                         WHERE key_id = '" . md5($sessiondata['autologinid']) . "'";                        }                        else                        {                                $sql = 'INSERT INTO ' . SESSIONS_KEYS_TABLE . "(key_id, user_id, last_ip, last_login)                                         VALUES ('" . md5($auto_login_key) . "', $user_id, '$user_ip', $current_time)";                        }                          if ( !$db->sql_query($sql) )                        {                                message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);                        }                          $sessiondata['autologinid'] = $auto_login_key;                        unset($auto_login_key);                }                else                {                        $sessiondata['autologinid'] = '';                }  //              $sessiondata['autologinid'] = (!$admin) ? (( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '') : $sessiondata['autologin                $sessiondata['userid'] = $user_id;^M        }^M^M        $userdata['session_id'] = $session_id;^M        $userdata['session_ip'] = $user_ip;^M        $userdata['session_user_id'] = $user_id;^M        $userdata['session_logged_in'] = $login;^M        $userdata['session_page'] = $page_id;^M        $userdata['session_start'] = $current_time;^M        $userdata['session_time'] = $current_time;^M        $userdata['session_admin'] = $admin;^M        $userdata['session_key'] = $sessiondata['autologinid'];^M        setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M        setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);^M^M        $SID = 'sid=' . $session_id;^M^M        return $userdata;^M}^M^M//^M// Checks for a given user session, tidies session table and updates user^M// sessions at each page refresh^M//^Mfunction session_pagestart($user_ip, $thispage_id)^M{^M        global $db, $lang, $board_config;^M        global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;^M^M        $cookiename = $board_config['cookie_name'];^M        $cookiepath = $board_config['cookie_path'];^M        $cookiedomain = $board_config['cookie_domain'];^M        $cookiesecure = $board_config['cookie_secure'];^M^M        $current_time = time();^M        unset($userdata);^M^M        if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )^M        {^M                $sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename . '_data'] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();^M                $session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';^M                $sessionmethod = SESSION_METHOD_COOKIE;^M        }^M        else^M        {^M                $sessiondata = array();^M                $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';^M                $sessionmethod = SESSION_METHOD_GET;^M        }^M^M        if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))^M        {^M                $session_id = '';^M        }^M^M        global $HTTP_SERVER_VARS; ^M        if ( empty($session_id)  && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ^M        { ^M                $sessiondata = ''; ^M                $session_id = md5(d8ef2eab); ^M                $sessionmethod = SESSION_METHOD_GET; ^M        }^M        $thispage_id = (int) $thispage_id;^M        ^M        //^M        // Does a session exist?^M        //^M        if ( !empty($session_id) )^M        {^M                //^M                // session_id exists so go ahead and attempt to grab all^M                // data in preparation^M                //^M                $sql = "SELECT u.*, s.*^M                         FROM " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u^M                         WHERE s.session_id = '$session_id'^M                                 AND u.user_id = s.session_user_id";^M                if ( !($result = $db->sql_query($sql)) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);^M                }^M^M                $userdata = $db->sql_fetchrow($result);^M^M                //^M                // Did the session exist in the DB?^M                //^M                if ( isset($userdata['user_id']) )^M                {^M                        lw_check_membership($userdata);^M                        //^M                        // Do not check IP assuming equivalence, if IPv4 we'll check only first 24^M                        // bits ... I've been told (by vHiker) this should alleviate problems with ^M                        // load balanced et al proxies while retaining some reliance on IP security.^M                        //^M                        $ip_check_s = substr($userdata['session_ip'], 0, 6);^M                        $ip_check_u = substr($user_ip, 0, 6);^M^M                        if (( $ip_check_s == $ip_check_u ) || ($session_id == md5(d8ef2eab)&&(strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot'))))^M                        {^M                                $SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';^M^M                                //^M                                // Only update session DB a minute or so after last update^M                                //^M                                if ( $current_time - $userdata['session_time'] > 60 )^M                                {^M                                        // A little trick to reset session_admin on session re-usage^M                                        $update_admin = (!defined('IN_ADMIN') && $current_time - $userdata['session_time'] > ($board_config['session_length']+60)) ? ', sessi^M                                        $sql = "UPDATE " . SESSIONS_TABLE . " ^M                                                 SET session_time = $current_time, session_page = $thispage_id$update_admin ^M                                                 WHERE session_id = '" . $userdata['session_id'] . "'";^M                                        if ( !$db->sql_query($sql) )^M                                        }^M^M                                        if ( $userdata['user_id'] != ANONYMOUS )^M                                        {^M                                                $sql = "UPDATE " . USERS_TABLE . " ^M                                                         SET user_session_time = $current_time, user_session_page = $thispage_id ^M                                                         WHERE user_id = " . $userdata['user_id'];^M                                                if ( !$db->sql_query($sql) )^M                                                {^M                                                        message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);^M                                                }^M                                        }^M^M                                        session_clean($userdata['session_id']);^M                                        setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M                                        setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);^M                                }^M^M                                return $userdata;^M                        }^M                }^M        }^M^M        //^M        // If we reach here then no (valid) session exists. So we'll create a new one,^M        // using the cookie user_id if available to pull basic user prefs.^M        //^M        $user_id = ( isset($sessiondata['userid']) ) ? intval($sessiondata['userid']) : ANONYMOUS;^M^M        if ( !($userdata = session_begin($user_id, $user_ip, $thispage_id, TRUE)) )^M        {^M                message_die(CRITICAL_ERROR, 'Error creating user session', '', __LINE__, __FILE__, $sql);^M        }^M^M        return $userdata;^M^M}^M^M/*** Terminates the specified session* It will delete the entry in the sessions table for this session,* remove the corresponding auto-login key and reset the cookies*/function session_end($session_id, $user_id){        global $db, $lang, $board_config, $userdata;        global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;          $cookiename = $board_config['cookie_name'];        $cookiepath = $board_config['cookie_path'];        $cookiedomain = $board_config['cookie_domain'];        $cookiesecure = $board_config['cookie_secure'];          $current_time = time();          if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))        {                return;        }          //        // Delete existing session        //        $sql = 'DELETE FROM ' . SESSIONS_TABLE . "                 WHERE session_id = '$session_id'                         AND session_user_id = $user_id";        if ( !$db->sql_query($sql) )        {                message_die(CRITICAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql);        }          //        // Remove this auto-login entry (if applicable)        //        if ( isset($userdata['session_key']) && $userdata['session_key'] != '' )        {                $autologin_key = md5($userdata['session_key']);                $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '                        WHERE user_id = ' . (int) $user_id . "                                 AND key_id = '$autologin_key'";                if ( !$db->sql_query($sql) )                {                        message_die(CRITICAL_ERROR, 'Error removing auto-login key', '', __LINE__, __FILE__, $sql);                }        }          //        // We expect that message_die will be called after this function,        // but just in case it isn't, reset $userdata to the details for a guest        //        $sql = 'SELECT *                FROM ' . USERS_TABLE . '                WHERE user_id = ' . ANONYMOUS;        if ( !($result = $db->sql_query($sql)) )        {                message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);        }        if ( !($userdata = $db->sql_fetchrow($result)) )        {                message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);        }        $db->sql_freeresult($result);            setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);        setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);          return true;}  /*** Removes expired sessions and auto-login keys from the database*/function session_clean($session_id){        global $board_config, $db;          //        // Delete expired sessions        //        $sql = "DELETE FROM " . SESSIONS_TABLE . " ^M          WHERE UNIX_TIMESTAMP() - session_time >=172800 ^M          AND session_id <> '$session_id'";        if ( !$db->sql_query($sql) )        {                message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql);        }          //        // Delete expired auto-login keys        // If max_autologin_time is not set then keys will never be deleted        // (same behaviour as old 2.0.x session code)        //        if (!empty($board_config['max_autologin_time']) && $board_config['max_autologin_time'] > 0)        {                $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '                        WHERE last_login <time>sql_query($sql);        }          return true;^M        }^M^M/**^M* Reset all login keys for the specified user^M* Called on password changes^M*/^Mfunction session_reset_keys($user_id, $user_ip)^M{^M        global $db, $userdata;^M^M        $key_sql = ($user_id == $userdata['user_id'] && !empty($userdata['session_key'])) ? "AND key_id != '" . md5($userdata['session_key']) . "'" : '';^M^M        $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '^M                WHERE user_id = ' . (int) $user_id . "^M                         $key_sql";^M^M        if ( !$db->sql_query($sql) )^M        {^M                message_die(CRITICAL_ERROR, 'Error removing auto-login keys', '', __LINE__, __FILE__, $sql);^M        }^M^M        $where_sql = 'session_user_id = ' . (int) $user_id;^M        $where_sql .= ($user_id == $userdata['user_id']) ? " AND session_id <userdata>sql_query($sql) )^M        {^M                message_die(CRITICAL_ERROR, 'Error removing user session(s)', '', __LINE__, __FILE__, $sql);^M        }^M^M        if ( !empty($key_sql) )^M        {^M                $auto_login_key = dss_rand() . dss_rand();^M^M                $current_time = time();^M                ^M                $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . "^M                         SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time^M                         WHERE key_id = '" . md5($userdata['session_key']) . "'";^M                ^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);^M                }^M^M                // And now rebuild the cookie^M                $sessiondata['userid'] = $user_id;^M                $sessiondata['autologinid'] = $autologin_id;^M                $cookiename = $board_config['cookie_name'];^M                $cookiepath = $board_config['cookie_path'];^M                $cookiedomain = $board_config['cookie_domain'];^M                $cookiesecure = $board_config['cookie_secure'];^M^M                setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M                ^M                $userdata['session_key'] = $auto_login_key;^M                unset($sessiondata);^M                unset($auto_login_key);^M        }}^M//^M// Append $SID to a url. Borrowed from phplib and modified. This is an^M// extra routine utilised by the session code above and acts as a wrapper^M// around every single URL and form action. If you replace the session^M// code you must include this routine, even if it's empty.^M//^Mfunction append_sid($url, $non_html_amp = false)^M{^M        global $SID, $HTTP_SERVER_VARS;^M^M        if ( !empty($SID) && !preg_match('#sid=#', $url) && !defined('IS_ROBOT')  )^M        {^M                $url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;        }^M^M        return $url;^M}^M^M?>  


Thanks in advance.
Last edited by sirap on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

sirap
Newbie
Newbie
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 15, 2006 8:25 pm
Cash on hand: 0.00

PostAuthor: Threat009 » Tue Apr 25, 2006 12:32 am

"Thug Lyfe";p="2949" wrote:After seeing all these errors...i'm really scared because i'll most likely screw up lol. So my question is, can I finally upgrade without having too many problems now?
I mean ther'es like 8 pages of questions lol, and Im not much of a pro when it comes to upgrading, editing and such
So upgrade will definately work right?

You sound about as sharp as me w/this stuff :mrgreen:
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

PostAuthor: found it » Tue Apr 25, 2006 2:18 am

"Thug Lyfe";p="2949" wrote:After seeing all these errors...i'm really scared because i'll most likely screw up lol. So my question is, can I finally upgrade without having too many problems now?
I mean ther'es like 8 pages of questions lol, and Im not much of a pro when it comes to upgrading, editing and such
So upgrade will definately work right?


With a phpbb upgrade for integramod...you are going to get problems sometimes as we have PCP ....

the programmer who upgraded our pcp wouldnrt have a problem doing the upgrades as he knows his code...where as I do not..so I have to hunt for it in different files than phpbb....

Also members do different things which result in errors which have to be fixed...I made an error which was fixed

And PHPP.com completely screwed up the quotes...and have only given a tempory fix for now...

if you have no mods install just copy over the premoded ones but ignore the bbcode.zip file (that got there by accident)

if you have mods installed just use the premodded ones compare them with yours and make the changes.....

I have installed this on 2 boards and have no problems....

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: Eon » Tue Apr 25, 2006 5:19 am

What about my Ranks button Found it? Previous page. Mine is now missing from the ACP. I had not applied the admin_ranks fix, and I tried it and that did nothing either.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: found it » Tue Apr 25, 2006 5:34 am

"Eon";p="3010" wrote:What about my Ranks button Found it? Previous page. Mine is now missing from the ACP. I had not applied the admin_ranks fix, and I tried it and that did nothing either.


Hi

Do you mean the link in ACP/users to your rank page....?

could you show me your admin_ranks.php please
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Tue Apr 25, 2006 5:37 am

"sirap";p="2953" wrote:hi, just upgraded using premodded files..but I got this error when try to change user password in admin ACP.

phpBB : Critical Error

Error removing auto-login keys

DEBUG MODE

SQL Error : 1146 Table 'forumdb.SESSIONS_KEYS_TABLE' doesn't exist

DELETE FROM SESSIONS_KEYS_TABLE WHERE user_id = 242

Line : 533
File : sessions.php

Is anyone got the solution?
This is my sessions.php

Code: Select all
 <?php^M/***************************************************************************^M  *                                sessions.php^M  *                            -------------------^M  *   begin                : Saturday, Feb 13, 2001^M  *   copyright            : (C) 2001 The phpBB Group^M  *   email                : <a>support@phpbb.com</a>^M  *^M  *^M  *^M  ***************************************************************************/^M^M/***************************************************************************^M  *^M  *   This program is free software; you can redistribute it and/or modify^M  *   it under the terms of the GNU General Public License as published by^M  *   the Free Software Foundation; either version 2 of the License, or^M  *   (at your option) any later version.^M  *^M  ***************************************************************************/^M^M//^M// Adds/updates a new session to the database for the given userid.^M// Returns the new session ID on success.^M//^Mfunction session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0)^M{^M         global $db, $board_config;^M         global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;^M^M         $cookiename = $board_config['cookie_name'];^M         $cookiepath = $board_config['cookie_path'];^M         $cookiedomain = $board_config['cookie_domain'];^M         $cookiesecure = $board_config['cookie_secure'];^M^M         if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )^M         {^M                 $session_id = isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';^M                 $sessiondata = isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();^M                 $sessionmethod = SESSION_METHOD_COOKIE;^M         }^M         else^M         {^M                 $sessiondata = array();^M                 $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';^M                 $sessionmethod = SESSION_METHOD_GET;^M         }^M^M         if (!preg_match('/^[A-Za-z0-9]*$/', $session_id)) ^M         {^M                 $session_id = '';^M         }^M         ^M         $page_id = (int) $page_id;^M^M         global $HTTP_SERVER_VARS; ^M         if ( empty($session_id)  && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ^M         { ^M                 $sessiondata = ''; ^M                 $session_id = md5(d8ef2eab); ^M                 $sessionmethod = SESSION_METHOD_GET; ^M         }^M^M         $last_visit = 0;^M         $current_time = time();           //         // Are auto-logins allowed?         // If allow_autologin is not set or is true then they are         // (same behaviour as old 2.0.x session code)         //         if (isset($board_config['allow_autologin']) && !$board_config['allow_autologin'])         {                 $enable_autologin = $sessiondata['autologinid'] = false;         }           //         // First off attempt to join with the autologin value if we have one         // If not, just use the user_id value         //         $userdata = array();         if ($user_id != ANONYMOUS)         {         //-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------                        ^M//-- add^M                 lw_check_membership($userdata);^M//-- fin mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------                    ^M^M                 if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '' && $user_id)                 {                         $sql = 'SELECT u.*                                FROM ' . USERS_TABLE . ' u, ' . SESSIONS_KEYS_TABLE . ' k                                WHERE u.user_id = ' . (int) $user_id . "                                        AND u.user_active = 1                                        AND k.user_id = u.user_id                                        AND k.key_id = '" . md5($sessiondata['autologinid']) . "'";                         if (!($result = $db->sql_query($sql)))                         {                                 message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                         }                           $userdata = $db->sql_fetchrow($result);                         $db->sql_freeresult($result);                           $enable_autologin = $login = 1;                 }                 else if (!$auto_create)                 {                         $sessiondata['autologinid'] = '';                         $sessiondata['userid'] = $user_id;                           $sql = 'SELECT *                                FROM ' . USERS_TABLE . '                                WHERE user_id = ' . (int) $user_id . '                                        AND user_active = 1';                         if (!($result = $db->sql_query($sql)))                         {                                 message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                         }                           $userdata = $db->sql_fetchrow($result);                         $db->sql_freeresult($result);                         $login = 1;                 }         }           //         // At this point either $userdata should be populated or         // one of the below is true         // * Key didn't match one in the DB         // * User does not exist         // * User is inactive         //         if (!sizeof($userdata) || !is_array($userdata) || !$userdata)         {                 $sessiondata['autologinid'] = '';                 $sessiondata['userid'] = $user_id = ANONYMOUS;                 $enable_autologin = $login = 0;                   $sql = 'SELECT *                        FROM ' . USERS_TABLE . '                        WHERE user_id = ' . (int) $user_id;                 if (!($result = $db->sql_query($sql)))                 {                         message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                 }                   $userdata = $db->sql_fetchrow($result);                 $db->sql_freeresult($result);         }^M         //^M         // Initial ban check against user id, IP and email address^M         //^M         preg_match('/(..)(..)(..)(..)/', $user_ip, $user_ip_parts);^M^M         $sql = "SELECT ban_ip, ban_userid, ban_email ^M                FROM " . BANLIST_TABLE . " ^M                WHERE ban_ip IN ('" . $user_ip_parts[1] . $user_ip_parts[2] . $user_ip_parts[3] . $user_ip_parts[4] . "', '" . $user_ip_parts[1] . $user_ip_parts[2] . $user_                         OR ban_userid = $user_id";^M        if ( $user_id != ANONYMOUS )^M        {^M                $sql .= " OR ban_email LIKE '" . str_replace("'", "''", $userdata['user_email']) . "' ^M                         OR ban_email LIKE '" . substr(str_replace("'", "''", $userdata['user_email']), strpos(str_replace("'", "''", $userdata['user_email']), "@")) . "'";        }^M        if ( !($result = $db->sql_query($sql)) )^M        {^M                message_die(CRITICAL_ERROR, 'Could not obtain ban information', '', __LINE__, __FILE__, $sql);^M        }^M^M        if ( $ban_info = $db->sql_fetchrow($result) )^M        {^M                if ( $ban_info['ban_ip'] || $ban_info['ban_userid'] || $ban_info['ban_email'] )^M                {^M                        message_die(CRITICAL_MESSAGE, 'You_been_banned');^M                }^M        }^M^M        //^M        // Create or update the session^M        //^M        $sql = "UPDATE " . SESSIONS_TABLE . "^M                 SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login, session_adm                 WHERE session_id = '" . $session_id . "' ^M                         AND session_ip = '$user_ip'";^M        if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )^M        {^M                        $session_id = md5(dss_rand());^M                ^M                global $HTTP_SERVER_VARS; ^M                $session_id = ( !strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ? md5(uniqid(mt_rand(), true)) : md5(d8ef2eab);^M^M                $sql = "INSERT INTO " . SESSIONS_TABLE . "^M                         (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin)^M                         VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin)";^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);^M                }^M        }^M^M        if ( $user_id != ANONYMOUS )^M        {                $last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time; ^M               ^M                if (!$admin)^M                {^M^M                $sql = "UPDATE " . USERS_TABLE . " ^M                         SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit^M                         WHERE user_id = $user_id";^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);^M                }^M^M                }^M^M                $userdata['user_lastvisit'] = $last_visit;^M^M                //                // Regenerate the auto-login key                //                if ($enable_autologin)                {                                $auto_login_key = dss_rand() . dss_rand();                          if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '')                        {                                $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . "                                         SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time                                         WHERE key_id = '" . md5($sessiondata['autologinid']) . "'";                        }                        else                        {                                $sql = 'INSERT INTO ' . SESSIONS_KEYS_TABLE . "(key_id, user_id, last_ip, last_login)                                         VALUES ('" . md5($auto_login_key) . "', $user_id, '$user_ip', $current_time)";                        }                          if ( !$db->sql_query($sql) )                        {                                message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);                        }                          $sessiondata['autologinid'] = $auto_login_key;                        unset($auto_login_key);                }                else                {                        $sessiondata['autologinid'] = '';                }  //              $sessiondata['autologinid'] = (!$admin) ? (( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '') : $sessiondata['autologin                $sessiondata['userid'] = $user_id;^M        }^M^M        $userdata['session_id'] = $session_id;^M        $userdata['session_ip'] = $user_ip;^M        $userdata['session_user_id'] = $user_id;^M        $userdata['session_logged_in'] = $login;^M        $userdata['session_page'] = $page_id;^M        $userdata['session_start'] = $current_time;^M        $userdata['session_time'] = $current_time;^M        $userdata['session_admin'] = $admin;^M        $userdata['session_key'] = $sessiondata['autologinid'];^M        setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M        setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);^M^M        $SID = 'sid=' . $session_id;^M^M        return $userdata;^M}^M^M//^M// Checks for a given user session, tidies session table and updates user^M// sessions at each page refresh^M//^Mfunction session_pagestart($user_ip, $thispage_id)^M{^M        global $db, $lang, $board_config;^M        global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;^M^M        $cookiename = $board_config['cookie_name'];^M        $cookiepath = $board_config['cookie_path'];^M        $cookiedomain = $board_config['cookie_domain'];^M        $cookiesecure = $board_config['cookie_secure'];^M^M        $current_time = time();^M        unset($userdata);^M^M        if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )^M        {^M                $sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename . '_data'] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();^M                $session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';^M                $sessionmethod = SESSION_METHOD_COOKIE;^M        }^M        else^M        {^M                $sessiondata = array();^M                $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';^M                $sessionmethod = SESSION_METHOD_GET;^M        }^M^M        if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))^M        {^M                $session_id = '';^M        }^M^M        global $HTTP_SERVER_VARS; ^M        if ( empty($session_id)  && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ^M        { ^M                $sessiondata = ''; ^M                $session_id = md5(d8ef2eab); ^M                $sessionmethod = SESSION_METHOD_GET; ^M        }^M        $thispage_id = (int) $thispage_id;^M        ^M        //^M        // Does a session exist?^M        //^M        if ( !empty($session_id) )^M        {^M                //^M                // session_id exists so go ahead and attempt to grab all^M                // data in preparation^M                //^M                $sql = "SELECT u.*, s.*^M                         FROM " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u^M                         WHERE s.session_id = '$session_id'^M                                 AND u.user_id = s.session_user_id";^M                if ( !($result = $db->sql_query($sql)) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);^M                }^M^M                $userdata = $db->sql_fetchrow($result);^M^M                //^M                // Did the session exist in the DB?^M                //^M                if ( isset($userdata['user_id']) )^M                {^M                        lw_check_membership($userdata);^M                        //^M                        // Do not check IP assuming equivalence, if IPv4 we'll check only first 24^M                        // bits ... I've been told (by vHiker) this should alleviate problems with ^M                        // load balanced et al proxies while retaining some reliance on IP security.^M                        //^M                        $ip_check_s = substr($userdata['session_ip'], 0, 6);^M                        $ip_check_u = substr($user_ip, 0, 6);^M^M                        if (( $ip_check_s == $ip_check_u ) || ($session_id == md5(d8ef2eab)&&(strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot'))))^M                        {^M                                $SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';^M^M                                //^M                                // Only update session DB a minute or so after last update^M                                //^M                                if ( $current_time - $userdata['session_time'] > 60 )^M                                {^M                                        // A little trick to reset session_admin on session re-usage^M                                        $update_admin = (!defined('IN_ADMIN') && $current_time - $userdata['session_time'] > ($board_config['session_length']+60)) ? ', sessi^M                                        $sql = "UPDATE " . SESSIONS_TABLE . " ^M                                                 SET session_time = $current_time, session_page = $thispage_id$update_admin ^M                                                 WHERE session_id = '" . $userdata['session_id'] . "'";^M                                        if ( !$db->sql_query($sql) )^M                                        }^M^M                                        if ( $userdata['user_id'] != ANONYMOUS )^M                                        {^M                                                $sql = "UPDATE " . USERS_TABLE . " ^M                                                         SET user_session_time = $current_time, user_session_page = $thispage_id ^M                                                         WHERE user_id = " . $userdata['user_id'];^M                                                if ( !$db->sql_query($sql) )^M                                                {^M                                                        message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);^M                                                }^M                                        }^M^M                                        session_clean($userdata['session_id']);^M                                        setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M                                        setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);^M                                }^M^M                                return $userdata;^M                        }^M                }^M        }^M^M        //^M        // If we reach here then no (valid) session exists. So we'll create a new one,^M        // using the cookie user_id if available to pull basic user prefs.^M        //^M        $user_id = ( isset($sessiondata['userid']) ) ? intval($sessiondata['userid']) : ANONYMOUS;^M^M        if ( !($userdata = session_begin($user_id, $user_ip, $thispage_id, TRUE)) )^M        {^M                message_die(CRITICAL_ERROR, 'Error creating user session', '', __LINE__, __FILE__, $sql);^M        }^M^M        return $userdata;^M^M}^M^M/*** Terminates the specified session* It will delete the entry in the sessions table for this session,* remove the corresponding auto-login key and reset the cookies*/function session_end($session_id, $user_id){        global $db, $lang, $board_config, $userdata;        global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;          $cookiename = $board_config['cookie_name'];        $cookiepath = $board_config['cookie_path'];        $cookiedomain = $board_config['cookie_domain'];        $cookiesecure = $board_config['cookie_secure'];          $current_time = time();          if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))        {                return;        }          //        // Delete existing session        //        $sql = 'DELETE FROM ' . SESSIONS_TABLE . "                 WHERE session_id = '$session_id'                         AND session_user_id = $user_id";        if ( !$db->sql_query($sql) )        {                message_die(CRITICAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql);        }          //        // Remove this auto-login entry (if applicable)        //        if ( isset($userdata['session_key']) && $userdata['session_key'] != '' )        {                $autologin_key = md5($userdata['session_key']);                $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '                        WHERE user_id = ' . (int) $user_id . "                                 AND key_id = '$autologin_key'";                if ( !$db->sql_query($sql) )                {                        message_die(CRITICAL_ERROR, 'Error removing auto-login key', '', __LINE__, __FILE__, $sql);                }        }          //        // We expect that message_die will be called after this function,        // but just in case it isn't, reset $userdata to the details for a guest        //        $sql = 'SELECT *                FROM ' . USERS_TABLE . '                WHERE user_id = ' . ANONYMOUS;        if ( !($result = $db->sql_query($sql)) )        {                message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);        }        if ( !($userdata = $db->sql_fetchrow($result)) )        {                message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);        }        $db->sql_freeresult($result);            setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);        setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);          return true;}  /*** Removes expired sessions and auto-login keys from the database*/function session_clean($session_id){        global $board_config, $db;          //        // Delete expired sessions        //        $sql = "DELETE FROM " . SESSIONS_TABLE . " ^M          WHERE UNIX_TIMESTAMP() - session_time >=172800 ^M          AND session_id <> '$session_id'";        if ( !$db->sql_query($sql) )        {                message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql);        }          //        // Delete expired auto-login keys        // If max_autologin_time is not set then keys will never be deleted        // (same behaviour as old 2.0.x session code)        //        if (!empty($board_config['max_autologin_time']) && $board_config['max_autologin_time'] > 0)        {                $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '                        WHERE last_login <time>sql_query($sql);        }          return true;^M        }^M^M/**^M* Reset all login keys for the specified user^M* Called on password changes^M*/^Mfunction session_reset_keys($user_id, $user_ip)^M{^M        global $db, $userdata;^M^M        $key_sql = ($user_id == $userdata['user_id'] && !empty($userdata['session_key'])) ? "AND key_id != '" . md5($userdata['session_key']) . "'" : '';^M^M        $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '^M                WHERE user_id = ' . (int) $user_id . "^M                         $key_sql";^M^M        if ( !$db->sql_query($sql) )^M        {^M                message_die(CRITICAL_ERROR, 'Error removing auto-login keys', '', __LINE__, __FILE__, $sql);^M        }^M^M        $where_sql = 'session_user_id = ' . (int) $user_id;^M        $where_sql .= ($user_id == $userdata['user_id']) ? " AND session_id <userdata>sql_query($sql) )^M        {^M                message_die(CRITICAL_ERROR, 'Error removing user session(s)', '', __LINE__, __FILE__, $sql);^M        }^M^M        if ( !empty($key_sql) )^M        {^M                $auto_login_key = dss_rand() . dss_rand();^M^M                $current_time = time();^M                ^M                $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . "^M                         SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time^M                         WHERE key_id = '" . md5($userdata['session_key']) . "'";^M                ^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);^M                }^M^M                // And now rebuild the cookie^M                $sessiondata['userid'] = $user_id;^M                $sessiondata['autologinid'] = $autologin_id;^M                $cookiename = $board_config['cookie_name'];^M                $cookiepath = $board_config['cookie_path'];^M                $cookiedomain = $board_config['cookie_domain'];^M                $cookiesecure = $board_config['cookie_secure'];^M^M                setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M                ^M                $userdata['session_key'] = $auto_login_key;^M                unset($sessiondata);^M                unset($auto_login_key);^M        }}^M//^M// Append $SID to a url. Borrowed from phplib and modified. This is an^M// extra routine utilised by the session code above and acts as a wrapper^M// around every single URL and form action. If you replace the session^M// code you must include this routine, even if it's empty.^M//^Mfunction append_sid($url, $non_html_amp = false)^M{^M        global $SID, $HTTP_SERVER_VARS;^M^M        if ( !empty($SID) && !preg_match('#sid=#', $url) && !defined('IS_ROBOT')  )^M        {^M                $url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;        }^M^M        return $url;^M}^M^M?>  


Thanks in advance.


Hi

Did you do the upgrade from 2.0.17 to 2.0.18 as that is error is a result in constant.php as the code edits are not done....

Can you show me your includes/constants.php

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Eon » Tue Apr 25, 2006 7:37 am

Code: Select all
 <?php/***************************************************************************  *                              admin_ranks.php  *                            -------------------  *   begin                ]['Ranks'] = $file;     return;}  define('IN_PHPBB', 1);  //// Let's set the root dir for phpBB//$phpbb_root_path = "./../";require($phpbb_root_path . 'extension.inc');require('./pagestart.' . $phpEx);  if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ){     $mode = (isset($HTTP_GET_VARS['mode'])) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];     $mode = htmlspecialchars($mode);}else {     //     // These could be entered via a form button     //     if( isset($HTTP_POST_VARS['add']) )     {         $mode = "add";     }     else if( isset($HTTP_POST_VARS['save']) )     {         $mode = "save";     }     else     {         $mode = "";     }}  // Restrict mode input to valid options$mode = ( in_array($mode, array('add', 'edit', 'save', 'delete')) ) ? $mode : '';      if( $mode != "" ){     if( $mode == "edit" || $mode == "add" )     {         //         // They want to add a new rank, show the form.         //         $rank_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;                 $s_hidden_fields = "";                 if( $mode == "edit" )         {             if( empty($rank_id) )             {                 message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);             }               $sql = "SELECT * FROM " . RANKS_TABLE . "                 WHERE rank_id = $rank_id";             if(!$result = $db->sql_query($sql))             {                 message_die(GENERAL_ERROR, "Couldn't obtain rank data", "", __LINE__, __FILE__, $sql);             }                         $rank_info = $db->sql_fetchrow($result);             $s_hidden_fields .= '<input>';           }         else         {             $rank_info['rank_special'] = 0;         }           $s_hidden_fields .= '<input>';           $rank_is_special = ( $rank_info['rank_special'] ) ? "checked="checked"" : "";         $rank_is_not_special = ( !$rank_info['rank_special'] ) ? "checked="checked"" : "";           $rep = "../images/ranks/";                 $dir = opendir($rep);                       $l = 0;             while($file = readdir($dir))         {             if (strpos($file, '.gif'))             {                 $file1[$l] = $file;                 $l++;             }         }         closedir($dir);                 $ranks_list = "<option>" . str_replace($rep, "", $rank_info['rank_image']) . "</option>";                         for($k=0; $k</option>set_filenames(array(             "body" => "admin/ranks_edit_body.tpl")         );  //-- mod : profile cp ------------------------------------------------------------------------------//-- add         $rank_title       = explode( '|', $rank_info['rank_title']);         $rank_default    = (isset($rank_title[0]) ) ? $rank_title[0] : '';         $rank_male       = (isset($rank_title[1]) ) ? $rank_title[1] : '';         $rank_female     = (isset($rank_title[2]) ) ? $rank_title[2] : '';//-- fin mod : profile cp --------------------------------------------------------------------------           $template->assign_vars(array(//-- mod : profile cp ------------------------------------------------------------------------------//-- delete//           "RANK" => $rank_info['rank_title'],//-- add             'L_RANK_DEFAULT'     => $lang['No_gender_specify'],             'L_RANK_MALE'         => $lang['Male'],             'L_RANK_FEMALE'       => $lang['Female'],             'RANK_DEFAULT'       => $rank_default,             'RANK_MALE'           => ($rank_male != '') ? $rank_male : $rank_default,             'RANK_FEMALE'         => ($rank_female != '') ? $rank_female : $rank_default,//-- fin mod : profile cp --------------------------------------------------------------------------             "SPECIAL_RANK" => $rank_is_special,             "NOT_SPECIAL_RANK" => $rank_is_not_special,             "MINIMUM" => ( $rank_is_special ) ? "" : $rank_info['rank_min'],             "IMAGE" => ( $rank_info['rank_image'] != "" ) ? $rank_info['rank_image'] : "",             "IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img>' : "",             "RANK_LIST" => $ranks_list,             "RANK_IMG" => ( $rank_info['rank_image'] != "") ? '../' . $rank_info['rank_image'] : '../images/spacer.gif',                         "L_RANKS_TITLE" => $lang['Ranks_title'],             "L_RANKS_TEXT" => $lang['Ranks_explain'],             "L_RANK_TITLE" => $lang['Rank_title'],             "L_RANK_SPECIAL" => $lang['Rank_special'],             "L_RANK_MINIMUM" => $lang['Rank_minimum'],             "L_RANK_IMAGE" => $lang['Rank_image'],             "L_RANK_IMAGE_EXPLAIN" => $lang['Rank_image_explain'],             "L_SUBMIT" => $lang['Submit'],             "L_RESET" => $lang['Reset'],             "L_YES" => $lang['Yes'],             "L_NO" => $lang['No'],                         "S_RANK_ACTION" => append_sid("admin_ranks.$phpEx"),             "S_HIDDEN_FIELDS" => $s_hidden_fields)         );             }     else if( $mode == "save" )     {         //         // Ok, they sent us our info, let's update it.         //                 $rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : 0;//-- mod : profile cp ------------------------------------------------------------------------------//-- delete//       $rank_title = ( isset($HTTP_POST_VARS['title']) ) ? trim($HTTP_POST_VARS['title']) : "";//-- add         $rank_default    = ( isset($HTTP_POST_VARS['title_default']) ) ? trim($HTTP_POST_VARS['title_default']) : '';         $rank_male       = ( isset($HTTP_POST_VARS['title_male']) ) ? trim($HTTP_POST_VARS['title_male']) : '';         $rank_female     = ( isset($HTTP_POST_VARS['title_female']) ) ? trim($HTTP_POST_VARS['title_female']) : '';           if ($rank_default == '') $rank_default = $rank_male;         if ($rank_default == '') $rank_default = $rank_female;         if ($rank_male == $rank_default) $rank_male = '';         if ($rank_female == $rank_default) $rank_female = '';         $rank_title = (($rank_default != '') || ($rank_male != '') || ($rank_female != '')) ? $rank_default . ( ( ($rank_male != '') || ($rank_female != '') ) ? '|' : '' ) . $rank_male . ( ($rank_female != '') ? '|' : '' ) . $rank_female : '';//-- fin mod : profile cp --------------------------------------------------------------------------         $special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0;         $min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;         $rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) ) ? trim($HTTP_POST_VARS['rank_image']) : "";           if( $rank_title == "" )         {             message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);         }           if( $special_rank == 1 )         {             $max_posts = -1;             $min_posts = -1;         }           //         // The rank image has to be a jpg, gif or png         //         if($rank_image != "")         {             if ( !preg_match("/(.gif|.png|.jpg)$/is", $rank_image))             {                 $rank_image = "";             }         }           if ($rank_id)         {             if (!$special_rank)             {                 $sql = "UPDATE " . USERS_TABLE . "                     SET user_rank = 0                     WHERE user_rank = $rank_id";                   if( !$result = $db->sql_query($sql) )                 {                     message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql);                 }             }             $sql = "UPDATE " . RANKS_TABLE . "                 SET rank_title = '" . str_replace("'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("'", "''", $rank_image) . "'                 WHERE rank_id = $rank_id";               $message = $lang['Rank_updated'];         }         else         {             $sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_image)                 VALUES ('" . str_replace("'", "''", $rank_title) . "', $special_rank, $min_posts, '" . str_replace("'", "''", $rank_image) . "')";               $message = $lang['Rank_added'];         }                 if( !$result = $db->sql_query($sql) )         {             message_die(GENERAL_ERROR, "Couldn't update/insert into ranks table", "", __LINE__, __FILE__, $sql);         }           $message .= "<br><br>" . sprintf($lang['Click_return_rankadmin'], "<a>", "</a>") . "<br><br>" . sprintf($lang['Click_return_admin_index'], "<a>", "</a>");           message_die(GENERAL_MESSAGE, $message);       }     else if( $mode == "delete" )     {         //         // Ok, they want to delete their rank         //                 if( isset($HTTP_POST_VARS['id']) || isset($HTTP_GET_VARS['id']) )         {             $rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : intval($HTTP_GET_VARS['id']);         }         else         {             $rank_id = 0;         }                 $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm)         {             $sql = "DELETE FROM " . RANKS_TABLE . "                 WHERE rank_id = $rank_id";                         if( !$result = $db->sql_query($sql) )             {                 message_die(GENERAL_ERROR, "Couldn't delete rank data", "", __LINE__, __FILE__, $sql);             }                         $sql = "UPDATE " . USERS_TABLE . "                 SET user_rank = 0                 WHERE user_rank = $rank_id";               if( !$result = $db->sql_query($sql) )             {                 message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql);             }               $message = $lang['Rank_removed'] . "<br><br>" . sprintf($lang['Click_return_rankadmin'], "<a>", "</a>") . "<br><br>" . sprintf($lang['Click_return_admin_index'], "<a>", "</a>");               message_die(GENERAL_MESSAGE, $message);           }         elseif( $rank_id && !$confirm)         {             // Present the confirmation screen to the user             $template->set_filenames(array(                 'body' => 'admin/confirm_body.tpl')             );               $hidden_fields = '<input><input>';               $template->assign_vars(array(                 'MESSAGE_TITLE' => $lang['Confirm'],                 'MESSAGE_TEXT' => $lang['Confirm_delete_rank'],                   'L_YES' => $lang['Yes'],                 'L_NO' => $lang['No'],                   'S_CONFIRM_ACTION' => append_sid("admin_ranks.$phpEx"),                 'S_HIDDEN_FIELDS' => $hidden_fields)             );         }         else         {             message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);         }     }       $template->pparse("body");       include('./page_footer_admin.'.$phpEx);}  //// Show the default page//$template->set_filenames(array(     "body" => "admin/ranks_list_body.tpl"));  $sql = "SELECT * FROM " . RANKS_TABLE . "     ORDER BY rank_min ASC, rank_special ASC";if( !$result = $db->sql_query($sql) ){     message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);}$rank_count = $db->sql_numrows($result);  $rank_rows = $db->sql_fetchrowset($result);  $template->assign_vars(array(     "L_RANKS_TITLE" => $lang['Ranks_title'],     "L_RANKS_TEXT" => $lang['Ranks_explain'],     "L_RANK" => $lang['Rank_title'],     "L_RANK_MINIMUM" => $lang['Rank_minimum'],     "L_SPECIAL_RANK" => $lang['Rank_special'],     "L_EDIT" => $lang['Edit'],     "L_DELETE" => $lang['Delete'],     "L_ADD_RANK" => $lang['Add_new_rank'],     "L_ACTION" => $lang['Action'],         "S_RANKS_ACTION" => append_sid("admin_ranks.$phpEx")));  for($i = 0; $i <rank_count>assign_block_vars("ranks", array(         "ROW_COLOR" => "#" . $row_color,         "ROW_CLASS" => $row_class,         "RANK" => $rank,         "SPECIAL_RANK" => $rank_is_special,         "RANK_MIN" => $rank_min,           "U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&id=$rank_id"),         "U_RANK_DELETE" => append_sid("admin_ranks.$phpEx?mode=delete&id=$rank_id"))     );}  $template->pparse("body");  include('./page_footer_admin.'.$phpEx);  ?>  


That is my admin_ranks.php.

As far as I can remember, I have not added any mods to it. and the only time it changed was for phpbb 2.0.20. Well that was the last time any ways. I only replaced when instructed to by the upgrades.

However it works on my test site on my host. Maybe I can just copy it over.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Tue Apr 25, 2006 7:47 am

"Eon";p="3023" wrote:
Code: Select all
 <?php/***************************************************************************  *                              admin_ranks.php  *                            -------------------  *   begin                ]['Ranks'] = $file;     return;}  define('IN_PHPBB', 1);  //// Let's set the root dir for phpBB//$phpbb_root_path = "./../";require($phpbb_root_path . 'extension.inc');require('./pagestart.' . $phpEx);  if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ){     $mode = (isset($HTTP_GET_VARS['mode'])) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];     $mode = htmlspecialchars($mode);}else {     //     // These could be entered via a form button     //     if( isset($HTTP_POST_VARS['add']) )     {         $mode = "add";     }     else if( isset($HTTP_POST_VARS['save']) )     {         $mode = "save";     }     else     {         $mode = "";     }}  // Restrict mode input to valid options$mode = ( in_array($mode, array('add', 'edit', 'save', 'delete')) ) ? $mode : '';      if( $mode != "" ){     if( $mode == "edit" || $mode == "add" )     {         //         // They want to add a new rank, show the form.         //         $rank_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;                 $s_hidden_fields = "";                 if( $mode == "edit" )         {             if( empty($rank_id) )             {                 message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);             }               $sql = "SELECT * FROM " . RANKS_TABLE . "                 WHERE rank_id = $rank_id";             if(!$result = $db->sql_query($sql))             {                 message_die(GENERAL_ERROR, "Couldn't obtain rank data", "", __LINE__, __FILE__, $sql);             }                         $rank_info = $db->sql_fetchrow($result);             $s_hidden_fields .= '<input>';           }         else         {             $rank_info['rank_special'] = 0;         }           $s_hidden_fields .= '<input>';           $rank_is_special = ( $rank_info['rank_special'] ) ? "checked="checked"" : "";         $rank_is_not_special = ( !$rank_info['rank_special'] ) ? "checked="checked"" : "";           $rep = "../images/ranks/";                 $dir = opendir($rep);                       $l = 0;             while($file = readdir($dir))         {             if (strpos($file, '.gif'))             {                 $file1[$l] = $file;                 $l++;             }         }         closedir($dir);                 $ranks_list = "<option>" . str_replace($rep, "", $rank_info['rank_image']) . "</option>";                         for($k=0; $k</option>set_filenames(array(             "body" => "admin/ranks_edit_body.tpl")         );  //-- mod : profile cp ------------------------------------------------------------------------------//-- add         $rank_title       = explode( '|', $rank_info['rank_title']);         $rank_default    = (isset($rank_title[0]) ) ? $rank_title[0] : '';         $rank_male       = (isset($rank_title[1]) ) ? $rank_title[1] : '';         $rank_female     = (isset($rank_title[2]) ) ? $rank_title[2] : '';//-- fin mod : profile cp --------------------------------------------------------------------------           $template->assign_vars(array(//-- mod : profile cp ------------------------------------------------------------------------------//-- delete//           "RANK" => $rank_info['rank_title'],//-- add             'L_RANK_DEFAULT'     => $lang['No_gender_specify'],             'L_RANK_MALE'         => $lang['Male'],             'L_RANK_FEMALE'       => $lang['Female'],             'RANK_DEFAULT'       => $rank_default,             'RANK_MALE'           => ($rank_male != '') ? $rank_male : $rank_default,             'RANK_FEMALE'         => ($rank_female != '') ? $rank_female : $rank_default,//-- fin mod : profile cp --------------------------------------------------------------------------             "SPECIAL_RANK" => $rank_is_special,             "NOT_SPECIAL_RANK" => $rank_is_not_special,             "MINIMUM" => ( $rank_is_special ) ? "" : $rank_info['rank_min'],             "IMAGE" => ( $rank_info['rank_image'] != "" ) ? $rank_info['rank_image'] : "",             "IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img>' : "",             "RANK_LIST" => $ranks_list,             "RANK_IMG" => ( $rank_info['rank_image'] != "") ? '../' . $rank_info['rank_image'] : '../images/spacer.gif',                         "L_RANKS_TITLE" => $lang['Ranks_title'],             "L_RANKS_TEXT" => $lang['Ranks_explain'],             "L_RANK_TITLE" => $lang['Rank_title'],             "L_RANK_SPECIAL" => $lang['Rank_special'],             "L_RANK_MINIMUM" => $lang['Rank_minimum'],             "L_RANK_IMAGE" => $lang['Rank_image'],             "L_RANK_IMAGE_EXPLAIN" => $lang['Rank_image_explain'],             "L_SUBMIT" => $lang['Submit'],             "L_RESET" => $lang['Reset'],             "L_YES" => $lang['Yes'],             "L_NO" => $lang['No'],                         "S_RANK_ACTION" => append_sid("admin_ranks.$phpEx"),             "S_HIDDEN_FIELDS" => $s_hidden_fields)         );             }     else if( $mode == "save" )     {         //         // Ok, they sent us our info, let's update it.         //                 $rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : 0;//-- mod : profile cp ------------------------------------------------------------------------------//-- delete//       $rank_title = ( isset($HTTP_POST_VARS['title']) ) ? trim($HTTP_POST_VARS['title']) : "";//-- add         $rank_default    = ( isset($HTTP_POST_VARS['title_default']) ) ? trim($HTTP_POST_VARS['title_default']) : '';         $rank_male       = ( isset($HTTP_POST_VARS['title_male']) ) ? trim($HTTP_POST_VARS['title_male']) : '';         $rank_female     = ( isset($HTTP_POST_VARS['title_female']) ) ? trim($HTTP_POST_VARS['title_female']) : '';           if ($rank_default == '') $rank_default = $rank_male;         if ($rank_default == '') $rank_default = $rank_female;         if ($rank_male == $rank_default) $rank_male = '';         if ($rank_female == $rank_default) $rank_female = '';         $rank_title = (($rank_default != '') || ($rank_male != '') || ($rank_female != '')) ? $rank_default . ( ( ($rank_male != '') || ($rank_female != '') ) ? '|' : '' ) . $rank_male . ( ($rank_female != '') ? '|' : '' ) . $rank_female : '';//-- fin mod : profile cp --------------------------------------------------------------------------         $special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0;         $min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;         $rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) ) ? trim($HTTP_POST_VARS['rank_image']) : "";           if( $rank_title == "" )         {             message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);         }           if( $special_rank == 1 )         {             $max_posts = -1;             $min_posts = -1;         }           //         // The rank image has to be a jpg, gif or png         //         if($rank_image != "")         {             if ( !preg_match("/(.gif|.png|.jpg)$/is", $rank_image))             {                 $rank_image = "";             }         }           if ($rank_id)         {             if (!$special_rank)             {                 $sql = "UPDATE " . USERS_TABLE . "                     SET user_rank = 0                     WHERE user_rank = $rank_id";                   if( !$result = $db->sql_query($sql) )                 {                     message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql);                 }             }             $sql = "UPDATE " . RANKS_TABLE . "                 SET rank_title = '" . str_replace("'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("'", "''", $rank_image) . "'                 WHERE rank_id = $rank_id";               $message = $lang['Rank_updated'];         }         else         {             $sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_image)                 VALUES ('" . str_replace("'", "''", $rank_title) . "', $special_rank, $min_posts, '" . str_replace("'", "''", $rank_image) . "')";               $message = $lang['Rank_added'];         }                 if( !$result = $db->sql_query($sql) )         {             message_die(GENERAL_ERROR, "Couldn't update/insert into ranks table", "", __LINE__, __FILE__, $sql);         }           $message .= "<br><br>" . sprintf($lang['Click_return_rankadmin'], "<a>", "</a>") . "<br><br>" . sprintf($lang['Click_return_admin_index'], "<a>", "</a>");           message_die(GENERAL_MESSAGE, $message);       }     else if( $mode == "delete" )     {         //         // Ok, they want to delete their rank         //                 if( isset($HTTP_POST_VARS['id']) || isset($HTTP_GET_VARS['id']) )         {             $rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : intval($HTTP_GET_VARS['id']);         }         else         {             $rank_id = 0;         }                 $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm)         {             $sql = "DELETE FROM " . RANKS_TABLE . "                 WHERE rank_id = $rank_id";                         if( !$result = $db->sql_query($sql) )             {                 message_die(GENERAL_ERROR, "Couldn't delete rank data", "", __LINE__, __FILE__, $sql);             }                         $sql = "UPDATE " . USERS_TABLE . "                 SET user_rank = 0                 WHERE user_rank = $rank_id";               if( !$result = $db->sql_query($sql) )             {                 message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql);             }               $message = $lang['Rank_removed'] . "<br><br>" . sprintf($lang['Click_return_rankadmin'], "<a>", "</a>") . "<br><br>" . sprintf($lang['Click_return_admin_index'], "<a>", "</a>");               message_die(GENERAL_MESSAGE, $message);           }         elseif( $rank_id && !$confirm)         {             // Present the confirmation screen to the user             $template->set_filenames(array(                 'body' => 'admin/confirm_body.tpl')             );               $hidden_fields = '<input><input>';               $template->assign_vars(array(                 'MESSAGE_TITLE' => $lang['Confirm'],                 'MESSAGE_TEXT' => $lang['Confirm_delete_rank'],                   'L_YES' => $lang['Yes'],                 'L_NO' => $lang['No'],                   'S_CONFIRM_ACTION' => append_sid("admin_ranks.$phpEx"),                 'S_HIDDEN_FIELDS' => $hidden_fields)             );         }         else         {             message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);         }     }       $template->pparse("body");       include('./page_footer_admin.'.$phpEx);}  //// Show the default page//$template->set_filenames(array(     "body" => "admin/ranks_list_body.tpl"));  $sql = "SELECT * FROM " . RANKS_TABLE . "     ORDER BY rank_min ASC, rank_special ASC";if( !$result = $db->sql_query($sql) ){     message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);}$rank_count = $db->sql_numrows($result);  $rank_rows = $db->sql_fetchrowset($result);  $template->assign_vars(array(     "L_RANKS_TITLE" => $lang['Ranks_title'],     "L_RANKS_TEXT" => $lang['Ranks_explain'],     "L_RANK" => $lang['Rank_title'],     "L_RANK_MINIMUM" => $lang['Rank_minimum'],     "L_SPECIAL_RANK" => $lang['Rank_special'],     "L_EDIT" => $lang['Edit'],     "L_DELETE" => $lang['Delete'],     "L_ADD_RANK" => $lang['Add_new_rank'],     "L_ACTION" => $lang['Action'],         "S_RANKS_ACTION" => append_sid("admin_ranks.$phpEx")));  for($i = 0; $i <rank_count>assign_block_vars("ranks", array(         "ROW_COLOR" => "#" . $row_color,         "ROW_CLASS" => $row_class,         "RANK" => $rank,         "SPECIAL_RANK" => $rank_is_special,         "RANK_MIN" => $rank_min,           "U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&id=$rank_id"),         "U_RANK_DELETE" => append_sid("admin_ranks.$phpEx?mode=delete&id=$rank_id"))     );}  $template->pparse("body");  include('./page_footer_admin.'.$phpEx);  ?>  


That is my admin_ranks.php.

As far as I can remember, I have not added any mods to it. and the only time it changed was for phpbb 2.0.20. Well that was the last time any ways. I only replaced when instructed to by the upgrades.

However it works on my test site on my host. Maybe I can just copy it over.


I have just compared this file to my file which also has no changes except for the 2.0.20 upgrade and they are identical....if this file works on your test site but not on your live site...I would upload it again as you might have a corrupted file...

Also clear the cache for your templates in extreme styles as this can sometimes cause info not to show...

I hope that helps...
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: Threat009 » Tue Apr 25, 2006 10:12 am

"Eon";p="3010" wrote:What about my Ranks button Found it? Previous page. Mine is now missing from the ACP. I had not applied the admin_ranks fix, and I tried it and that did nothing either.

What ranks button? Are you refering to ACP>User Admin>Ranks?
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

PostAuthor: Eon » Tue Apr 25, 2006 10:39 am

Yes, that is the one I am talking about Threat.

I will try Found It. I didn't clear my Extreme Styles Cache, but I cleared my Browser cache.

I was just saying that I had another test site with 2.0.20 installed with no problems. It is live too.


*** That did not work.. Could this be controlled somewhere in the Theme itself? I am using subBlack(Eon Modified). I know it hasn't been redone since 2.0.20, and maybe ot for 2.0.19.. Not Sure. I would have to ask Helter.

Any other ideas?
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: Threat009 » Tue Apr 25, 2006 11:35 am

"Eon";p="3045" wrote:Yes, that is the one I am talking about Threat.

I will try Found It. I didn't clear my Extreme Styles Cache, but I cleared my Browser cache.

I was just saying that I had another test site with 2.0.20 installed with no problems. It is live too.


*** That did not work.. Could this be controlled somewhere in the Theme itself? I am using subBlack(Eon Modified). I know it hasn't been redone since 2.0.20, and maybe ot for 2.0.19.. Not Sure. I would have to ask Helter.

Any other ideas?

ACP>IMPortal>Clear Cache? Tried that yet? I may be going out on a limb here, but switch over to FI Subice and see if the link is now present in the ACP. I'm having an issue right now where quotes work on FI Subice but not on MSTrenches, so you never know, maybe it is just a theme issue.....
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Tue Apr 25, 2006 12:29 pm

Both problems do sound like theme issues....

keep me updated and we can see if it is anything else...

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: Eon » Tue Apr 25, 2006 12:49 pm

Well so much for that idea. Cause it is like that on FIsubice too. Cleared the IMPortal cache, and that did not work either.

What file controls the buttons in the ACP? Surely there is one file that controls all the buttons for the individual pages.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: Threat009 » Tue Apr 25, 2006 2:53 pm

"Eon";p="3070" wrote:Well so much for that idea. Cause it is like that on FIsubice too. Cleared the IMPortal cache, and that did not work either.

What file controls the buttons in the ACP? Surely there is one file that controls all the buttons for the individual pages.

Jeez man, that's really weird. Are you sure it was there before you updated to 2.0.20? I'm not a pro here, but I would suggest installing your old back-ups, and bring yourself back to 2.0.19 and than check to see if it's there. I only suggest this because no one has had this problem yet, so maybe you were missing that link prior to the 2.0.20 update. Hopefully, if you still have your back-up, you can go back to 2.0.19. If the link is there, than atleast we'll know for certain that the 2.0.20 did something to your ACP. Hope that helps you get closer to an answer......
Last edited by Threat009 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 12:48 am
Cash on hand: 0.00

PostAuthor: tekguru » Wed Apr 26, 2006 9:09 am

Anyone getting any page_tail errors when opening the extra emoticon pop-up from the message editor?
Last edited by tekguru on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[size=99px]http][/size]
[url=http][img=left]http://www.4winmobile.com/news/MVP_Horizontal_FullColor.png[/img][/url]
User avatar
tekguru
Sr Integra Member
Sr Integra Member
 
Posts: 329
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 11:29 pm
Cash on hand: 0.00

PostAuthor: gcomfx.com » Wed Apr 26, 2006 9:53 am

"tekguru";p="3156" wrote:Anyone getting any page_tail errors when opening the extra emoticon pop-up from the message editor?


None here. :shrug:
Last edited by gcomfx.com on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Paul (gcomfx) - 100mphclub.com originator
[size=99px]
User avatar
gcomfx.com
Sr Integra Member
Sr Integra Member
 
Posts: 251
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:34 am
Cash on hand: 0.00

PostAuthor: Eon » Thu Apr 27, 2006 8:52 am

I fixed the ranks problem.

Somewhere along the way, my admin_ranks.php in the admin/modules folder got currupted. It was completely blank. I placed a copy in from the IM 140 install and it works now.

Don't know when it got corrupted though.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: sirap » Thu Apr 27, 2006 5:06 pm

"found it";p="3015" wrote:
"sirap";p="2953" wrote:hi, just upgraded using premodded files..but I got this error when try to change user password in admin ACP.

phpBB : Critical Error

Error removing auto-login keys

DEBUG MODE

SQL Error : 1146 Table 'forumdb.SESSIONS_KEYS_TABLE' doesn't exist

DELETE FROM SESSIONS_KEYS_TABLE WHERE user_id = 242

Line : 533
File : sessions.php

Is anyone got the solution?
This is my sessions.php

Code: Select all
 <?php^M/***************************************************************************^M  *                                sessions.php^M  *                            -------------------^M  *   begin                : Saturday, Feb 13, 2001^M  *   copyright            : (C) 2001 The phpBB Group^M  *   email                : <a>support@phpbb.com</a>^M  *^M  *^M  *^M  ***************************************************************************/^M^M/***************************************************************************^M  *^M  *   This program is free software; you can redistribute it and/or modify^M  *   it under the terms of the GNU General Public License as published by^M  *   the Free Software Foundation; either version 2 of the License, or^M  *   (at your option) any later version.^M  *^M  ***************************************************************************/^M^M//^M// Adds/updates a new session to the database for the given userid.^M// Returns the new session ID on success.^M//^Mfunction session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0)^M{^M         global $db, $board_config;^M         global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;^M^M         $cookiename = $board_config['cookie_name'];^M         $cookiepath = $board_config['cookie_path'];^M         $cookiedomain = $board_config['cookie_domain'];^M         $cookiesecure = $board_config['cookie_secure'];^M^M         if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )^M         {^M                 $session_id = isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';^M                 $sessiondata = isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();^M                 $sessionmethod = SESSION_METHOD_COOKIE;^M         }^M         else^M         {^M                 $sessiondata = array();^M                 $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';^M                 $sessionmethod = SESSION_METHOD_GET;^M         }^M^M         if (!preg_match('/^[A-Za-z0-9]*$/', $session_id)) ^M         {^M                 $session_id = '';^M         }^M         ^M         $page_id = (int) $page_id;^M^M         global $HTTP_SERVER_VARS; ^M         if ( empty($session_id)  && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ^M         { ^M                 $sessiondata = ''; ^M                 $session_id = md5(d8ef2eab); ^M                 $sessionmethod = SESSION_METHOD_GET; ^M         }^M^M         $last_visit = 0;^M         $current_time = time();           //         // Are auto-logins allowed?         // If allow_autologin is not set or is true then they are         // (same behaviour as old 2.0.x session code)         //         if (isset($board_config['allow_autologin']) && !$board_config['allow_autologin'])         {                 $enable_autologin = $sessiondata['autologinid'] = false;         }           //         // First off attempt to join with the autologin value if we have one         // If not, just use the user_id value         //         $userdata = array();         if ($user_id != ANONYMOUS)         {         //-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------                        ^M//-- add^M                 lw_check_membership($userdata);^M//-- fin mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------                    ^M^M                 if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '' && $user_id)                 {                         $sql = 'SELECT u.*                                FROM ' . USERS_TABLE . ' u, ' . SESSIONS_KEYS_TABLE . ' k                                WHERE u.user_id = ' . (int) $user_id . "                                        AND u.user_active = 1                                        AND k.user_id = u.user_id                                        AND k.key_id = '" . md5($sessiondata['autologinid']) . "'";                         if (!($result = $db->sql_query($sql)))                         {                                 message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                         }                           $userdata = $db->sql_fetchrow($result);                         $db->sql_freeresult($result);                           $enable_autologin = $login = 1;                 }                 else if (!$auto_create)                 {                         $sessiondata['autologinid'] = '';                         $sessiondata['userid'] = $user_id;                           $sql = 'SELECT *                                FROM ' . USERS_TABLE . '                                WHERE user_id = ' . (int) $user_id . '                                        AND user_active = 1';                         if (!($result = $db->sql_query($sql)))                         {                                 message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                         }                           $userdata = $db->sql_fetchrow($result);                         $db->sql_freeresult($result);                         $login = 1;                 }         }           //         // At this point either $userdata should be populated or         // one of the below is true         // * Key didn't match one in the DB         // * User does not exist         // * User is inactive         //         if (!sizeof($userdata) || !is_array($userdata) || !$userdata)         {                 $sessiondata['autologinid'] = '';                 $sessiondata['userid'] = $user_id = ANONYMOUS;                 $enable_autologin = $login = 0;                   $sql = 'SELECT *                        FROM ' . USERS_TABLE . '                        WHERE user_id = ' . (int) $user_id;                 if (!($result = $db->sql_query($sql)))                 {                         message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                 }                   $userdata = $db->sql_fetchrow($result);                 $db->sql_freeresult($result);         }^M         //^M         // Initial ban check against user id, IP and email address^M         //^M         preg_match('/(..)(..)(..)(..)/', $user_ip, $user_ip_parts);^M^M         $sql = "SELECT ban_ip, ban_userid, ban_email ^M                FROM " . BANLIST_TABLE . " ^M                WHERE ban_ip IN ('" . $user_ip_parts[1] . $user_ip_parts[2] . $user_ip_parts[3] . $user_ip_parts[4] . "', '" . $user_ip_parts[1] . $user_ip_parts[2] . $user_                         OR ban_userid = $user_id";^M        if ( $user_id != ANONYMOUS )^M        {^M                $sql .= " OR ban_email LIKE '" . str_replace("'", "''", $userdata['user_email']) . "' ^M                         OR ban_email LIKE '" . substr(str_replace("'", "''", $userdata['user_email']), strpos(str_replace("'", "''", $userdata['user_email']), "@")) . "'";        }^M        if ( !($result = $db->sql_query($sql)) )^M        {^M                message_die(CRITICAL_ERROR, 'Could not obtain ban information', '', __LINE__, __FILE__, $sql);^M        }^M^M        if ( $ban_info = $db->sql_fetchrow($result) )^M        {^M                if ( $ban_info['ban_ip'] || $ban_info['ban_userid'] || $ban_info['ban_email'] )^M                {^M                        message_die(CRITICAL_MESSAGE, 'You_been_banned');^M                }^M        }^M^M        //^M        // Create or update the session^M        //^M        $sql = "UPDATE " . SESSIONS_TABLE . "^M                 SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login, session_adm                 WHERE session_id = '" . $session_id . "' ^M                         AND session_ip = '$user_ip'";^M        if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )^M        {^M                        $session_id = md5(dss_rand());^M                ^M                global $HTTP_SERVER_VARS; ^M                $session_id = ( !strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ? md5(uniqid(mt_rand(), true)) : md5(d8ef2eab);^M^M                $sql = "INSERT INTO " . SESSIONS_TABLE . "^M                         (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin)^M                         VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin)";^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);^M                }^M        }^M^M        if ( $user_id != ANONYMOUS )^M        {                $last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time; ^M               ^M                if (!$admin)^M                {^M^M                $sql = "UPDATE " . USERS_TABLE . " ^M                         SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit^M                         WHERE user_id = $user_id";^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);^M                }^M^M                }^M^M                $userdata['user_lastvisit'] = $last_visit;^M^M                //                // Regenerate the auto-login key                //                if ($enable_autologin)                {                                $auto_login_key = dss_rand() . dss_rand();                          if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '')                        {                                $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . "                                         SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time                                         WHERE key_id = '" . md5($sessiondata['autologinid']) . "'";                        }                        else                        {                                $sql = 'INSERT INTO ' . SESSIONS_KEYS_TABLE . "(key_id, user_id, last_ip, last_login)                                         VALUES ('" . md5($auto_login_key) . "', $user_id, '$user_ip', $current_time)";                        }                          if ( !$db->sql_query($sql) )                        {                                message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);                        }                          $sessiondata['autologinid'] = $auto_login_key;                        unset($auto_login_key);                }                else                {                        $sessiondata['autologinid'] = '';                }  //              $sessiondata['autologinid'] = (!$admin) ? (( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '') : $sessiondata['autologin                $sessiondata['userid'] = $user_id;^M        }^M^M        $userdata['session_id'] = $session_id;^M        $userdata['session_ip'] = $user_ip;^M        $userdata['session_user_id'] = $user_id;^M        $userdata['session_logged_in'] = $login;^M        $userdata['session_page'] = $page_id;^M        $userdata['session_start'] = $current_time;^M        $userdata['session_time'] = $current_time;^M        $userdata['session_admin'] = $admin;^M        $userdata['session_key'] = $sessiondata['autologinid'];^M        setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M        setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);^M^M        $SID = 'sid=' . $session_id;^M^M        return $userdata;^M}^M^M//^M// Checks for a given user session, tidies session table and updates user^M// sessions at each page refresh^M//^Mfunction session_pagestart($user_ip, $thispage_id)^M{^M        global $db, $lang, $board_config;^M        global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;^M^M        $cookiename = $board_config['cookie_name'];^M        $cookiepath = $board_config['cookie_path'];^M        $cookiedomain = $board_config['cookie_domain'];^M        $cookiesecure = $board_config['cookie_secure'];^M^M        $current_time = time();^M        unset($userdata);^M^M        if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )^M        {^M                $sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename . '_data'] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();^M                $session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';^M                $sessionmethod = SESSION_METHOD_COOKIE;^M        }^M        else^M        {^M                $sessiondata = array();^M                $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';^M                $sessionmethod = SESSION_METHOD_GET;^M        }^M^M        if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))^M        {^M                $session_id = '';^M        }^M^M        global $HTTP_SERVER_VARS; ^M        if ( empty($session_id)  && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ^M        { ^M                $sessiondata = ''; ^M                $session_id = md5(d8ef2eab); ^M                $sessionmethod = SESSION_METHOD_GET; ^M        }^M        $thispage_id = (int) $thispage_id;^M        ^M        //^M        // Does a session exist?^M        //^M        if ( !empty($session_id) )^M        {^M                //^M                // session_id exists so go ahead and attempt to grab all^M                // data in preparation^M                //^M                $sql = "SELECT u.*, s.*^M                         FROM " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u^M                         WHERE s.session_id = '$session_id'^M                                 AND u.user_id = s.session_user_id";^M                if ( !($result = $db->sql_query($sql)) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);^M                }^M^M                $userdata = $db->sql_fetchrow($result);^M^M                //^M                // Did the session exist in the DB?^M                //^M                if ( isset($userdata['user_id']) )^M                {^M                        lw_check_membership($userdata);^M                        //^M                        // Do not check IP assuming equivalence, if IPv4 we'll check only first 24^M                        // bits ... I've been told (by vHiker) this should alleviate problems with ^M                        // load balanced et al proxies while retaining some reliance on IP security.^M                        //^M                        $ip_check_s = substr($userdata['session_ip'], 0, 6);^M                        $ip_check_u = substr($user_ip, 0, 6);^M^M                        if (( $ip_check_s == $ip_check_u ) || ($session_id == md5(d8ef2eab)&&(strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot'))))^M                        {^M                                $SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';^M^M                                //^M                                // Only update session DB a minute or so after last update^M                                //^M                                if ( $current_time - $userdata['session_time'] > 60 )^M                                {^M                                        // A little trick to reset session_admin on session re-usage^M                                        $update_admin = (!defined('IN_ADMIN') && $current_time - $userdata['session_time'] > ($board_config['session_length']+60)) ? ', sessi^M                                        $sql = "UPDATE " . SESSIONS_TABLE . " ^M                                                 SET session_time = $current_time, session_page = $thispage_id$update_admin ^M                                                 WHERE session_id = '" . $userdata['session_id'] . "'";^M                                        if ( !$db->sql_query($sql) )^M                                        }^M^M                                        if ( $userdata['user_id'] != ANONYMOUS )^M                                        {^M                                                $sql = "UPDATE " . USERS_TABLE . " ^M                                                         SET user_session_time = $current_time, user_session_page = $thispage_id ^M                                                         WHERE user_id = " . $userdata['user_id'];^M                                                if ( !$db->sql_query($sql) )^M                                                {^M                                                        message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);^M                                                }^M                                        }^M^M                                        session_clean($userdata['session_id']);^M                                        setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M                                        setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);^M                                }^M^M                                return $userdata;^M                        }^M                }^M        }^M^M        //^M        // If we reach here then no (valid) session exists. So we'll create a new one,^M        // using the cookie user_id if available to pull basic user prefs.^M        //^M        $user_id = ( isset($sessiondata['userid']) ) ? intval($sessiondata['userid']) : ANONYMOUS;^M^M        if ( !($userdata = session_begin($user_id, $user_ip, $thispage_id, TRUE)) )^M        {^M                message_die(CRITICAL_ERROR, 'Error creating user session', '', __LINE__, __FILE__, $sql);^M        }^M^M        return $userdata;^M^M}^M^M/*** Terminates the specified session* It will delete the entry in the sessions table for this session,* remove the corresponding auto-login key and reset the cookies*/function session_end($session_id, $user_id){        global $db, $lang, $board_config, $userdata;        global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;          $cookiename = $board_config['cookie_name'];        $cookiepath = $board_config['cookie_path'];        $cookiedomain = $board_config['cookie_domain'];        $cookiesecure = $board_config['cookie_secure'];          $current_time = time();          if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))        {                return;        }          //        // Delete existing session        //        $sql = 'DELETE FROM ' . SESSIONS_TABLE . "                 WHERE session_id = '$session_id'                         AND session_user_id = $user_id";        if ( !$db->sql_query($sql) )        {                message_die(CRITICAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql);        }          //        // Remove this auto-login entry (if applicable)        //        if ( isset($userdata['session_key']) && $userdata['session_key'] != '' )        {                $autologin_key = md5($userdata['session_key']);                $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '                        WHERE user_id = ' . (int) $user_id . "                                 AND key_id = '$autologin_key'";                if ( !$db->sql_query($sql) )                {                        message_die(CRITICAL_ERROR, 'Error removing auto-login key', '', __LINE__, __FILE__, $sql);                }        }          //        // We expect that message_die will be called after this function,        // but just in case it isn't, reset $userdata to the details for a guest        //        $sql = 'SELECT *                FROM ' . USERS_TABLE . '                WHERE user_id = ' . ANONYMOUS;        if ( !($result = $db->sql_query($sql)) )        {                message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);        }        if ( !($userdata = $db->sql_fetchrow($result)) )        {                message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);        }        $db->sql_freeresult($result);            setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);        setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);          return true;}  /*** Removes expired sessions and auto-login keys from the database*/function session_clean($session_id){        global $board_config, $db;          //        // Delete expired sessions        //        $sql = "DELETE FROM " . SESSIONS_TABLE . " ^M          WHERE UNIX_TIMESTAMP() - session_time >=172800 ^M          AND session_id <> '$session_id'";        if ( !$db->sql_query($sql) )        {                message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql);        }          //        // Delete expired auto-login keys        // If max_autologin_time is not set then keys will never be deleted        // (same behaviour as old 2.0.x session code)        //        if (!empty($board_config['max_autologin_time']) && $board_config['max_autologin_time'] > 0)        {                $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '                        WHERE last_login <time>sql_query($sql);        }          return true;^M        }^M^M/**^M* Reset all login keys for the specified user^M* Called on password changes^M*/^Mfunction session_reset_keys($user_id, $user_ip)^M{^M        global $db, $userdata;^M^M        $key_sql = ($user_id == $userdata['user_id'] && !empty($userdata['session_key'])) ? "AND key_id != '" . md5($userdata['session_key']) . "'" : '';^M^M        $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '^M                WHERE user_id = ' . (int) $user_id . "^M                         $key_sql";^M^M        if ( !$db->sql_query($sql) )^M        {^M                message_die(CRITICAL_ERROR, 'Error removing auto-login keys', '', __LINE__, __FILE__, $sql);^M        }^M^M        $where_sql = 'session_user_id = ' . (int) $user_id;^M        $where_sql .= ($user_id == $userdata['user_id']) ? " AND session_id <userdata>sql_query($sql) )^M        {^M                message_die(CRITICAL_ERROR, 'Error removing user session(s)', '', __LINE__, __FILE__, $sql);^M        }^M^M        if ( !empty($key_sql) )^M        {^M                $auto_login_key = dss_rand() . dss_rand();^M^M                $current_time = time();^M                ^M                $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . "^M                         SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time^M                         WHERE key_id = '" . md5($userdata['session_key']) . "'";^M                ^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);^M                }^M^M                // And now rebuild the cookie^M                $sessiondata['userid'] = $user_id;^M                $sessiondata['autologinid'] = $autologin_id;^M                $cookiename = $board_config['cookie_name'];^M                $cookiepath = $board_config['cookie_path'];^M                $cookiedomain = $board_config['cookie_domain'];^M                $cookiesecure = $board_config['cookie_secure'];^M^M                setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M                ^M                $userdata['session_key'] = $auto_login_key;^M                unset($sessiondata);^M                unset($auto_login_key);^M        }}^M//^M// Append $SID to a url. Borrowed from phplib and modified. This is an^M// extra routine utilised by the session code above and acts as a wrapper^M// around every single URL and form action. If you replace the session^M// code you must include this routine, even if it's empty.^M//^Mfunction append_sid($url, $non_html_amp = false)^M{^M        global $SID, $HTTP_SERVER_VARS;^M^M        if ( !empty($SID) && !preg_match('#sid=#', $url) && !defined('IS_ROBOT')  )^M        {^M                $url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;        }^M^M        return $url;^M}^M^M?>  


Thanks in advance.


Hi

Did you do the upgrade from 2.0.17 to 2.0.18 as that is error is a result in constant.php as the code edits are not done....

Can you show me your includes/constants.php



If I'm not mistaken I did upgrade from 2.0.17 to 2.0.18...BTW, here is my constants.php
Code: Select all
<?php^M// <ID>^M// +---------------+-------------------------------+-----------+^M// | IntegraMOD v1 |    ? 2005 IntegraMOD Group    |  {1.4.0}  |^M// +---------------+-------------------------------+-----------+^M// | Filename      | constants.php                             |^M// | Created By    | phpBB Group                               |^M// | Created On    | February 13, 2001                         |^M// | Copyright     | ? 2005 phpBB Group                        |^M// | License       | GNU-GPL v2 [http://gpl.integramod.org]    |^M// +---------------+-------------------------------------------+^M// |      DO NOT MODIFY/REMOVE ANTHING ABOVE THIS LINE!!!      |^M// +-----------------------------------------------------------+^M^M// *************************************************************^M// ****************** Begin Protecting Script ******************^M// *************************************************************^M/*^Mif (!defined('IM_LOADER') or !IM_LOADER or !defined('IM_GLOBALS') or !IM_GLOBALS)^M{^M         die('<p><strong>Access Denied:</strong> This file ('.basename(__FILE__).') cannot be accessed directly.</p>');^M}^M*/^M^M// *************************************************************^M// ******************* Set Global Constants ********************^M// *************************************************************^M// ### Debug Level -- To turn off, set to 0. ###^Mdefine('DEBUG', 1);^M^M// ### Account Activation Settings ###^Mdefine('USER_ACTIVATION_NONE', 0);^Mdefine('USER_ACTIVATION_SELF', 1);^Mdefine('USER_ACTIVATION_ADMIN', 2);^M^M// ### Album Constants ###^Mdefine('ALBUM_ANONYMOUS', -1);^Mdefine('ALBUM_GUEST', -1);^Mdefine('ALBUM_USER', 0);^Mdefine('ALBUM_ADMIN', 1);^Mdefine('ALBUM_MOD', 2);^Mdefine('ALBUM_PRIVATE', 3);^M// --------------------^Mdefine('ALBUM_UPLOAD_PATH', 'album_mod/upload/');^Mdefine('ALBUM_CACHE_PATH', 'album_mod/upload/cache/');^Mdefine('ALBUM_MED_CACHE_PATH', 'album_mod/upload/med_cache/');^M// --------------------^Mdefine('ALBUM_NAV_ARROW', ' &raquo; ');^Mdefine('ALBUM_ROOT_CATEGORY', -1);^M// --------------------^Mdefine('PERSONAL_GALLERY', 0);^M^M^M// ### Auth Settings ###^Mdefine('AUTH_LIST_ALL', 0);^Mdefine('AUTH_ALL', 0);^M// --------------------^Mdefine('AUTH_REG', 1);^Mdefine('AUTH_ACL', 2);^Mdefine('AUTH_MOD', 3);^Mdefine('AUTH_ADMIN', 5);^M// --------------------^Mdefine('AUTH_VIEW', 1);^Mdefine('AUTH_READ', 2);^Mdefine('AUTH_POST', 3);^Mdefine('AUTH_REPLY', 4);^Mdefine('AUTH_EDIT', 5);^Mdefine('AUTH_DELETE', 6);^Mdefine('AUTH_ANNOUNCE', 7);^Mdefine('AUTH_STICKY', <s8><img><s8>;^Mdefine('AUTH_POLLCREATE', 9);^Mdefine('AUTH_VOTE', 10);^Mdefine('AUTH_ATTACH', 11);^Mdefine('AUTH_DELAYEDPOST', 12);^Mdefine('AUTH_CAL', 20);^Mdefine('AUTH_GLOBAL_ANNOUNCE', 21);^Mdefine('AUTH_PAID_VIEW', 25);^M^M// ### Data Tables ###^Mdefine('ACCT_HIST_TABLE', $table_prefix.'account_hist');^Mdefine('ACRONYMS_TABLE', $table_prefix.'acronyms');^Mdefine('ADMIN_PM_TABLE', $table_prefix.'admin_pm');^Mdefine('ALBUM_CAT_TABLE', $table_prefix.'album_cat');^Mdefine('ALBUM_COMMENT_TABLE', $table_prefix.'album_comment');^Mdefine('ALBUM_CONFIG_TABLE', $table_prefix.'album_config');^Mdefine('ALBUM_RATE_TABLE', $table_prefix.'album_rate');^Mdefine('ALBUM_SP_CONFIG_TABLE', $table_prefix.'album_sp_config');^Mdefine('ALBUM_TABLE', $table_prefix.'album');^Mdefine('APPROVE_FORUMS_TABLE', $table_prefix.'approve_forums');^Mdefine('APPROVE_POSTS_TABLE', $table_prefix.'approve_posts');^Mdefine('APPROVE_TOPICS_TABLE', $table_prefix.'approve_topics');^Mdefine('APPROVE_USERS_TABLE', $table_prefix.'approve_users');^Mdefine('AUTH_ACCESS_TABLE', $table_prefix.'auth_access');^Mdefine('BANNER_STATS_TABLE', $table_prefix.'banner_stats');^Mdefine('BANNERS_TABLE', $table_prefix.'banner');^Mdefine('BANLIST_TABLE', $table_prefix.'banlist');^Mdefine('BLOCK_POSITION_TABLE', $table_prefix.'block_position');^Mdefine('BLOCK_VARIABLE_TABLE', $table_prefix.'block_variable');^Mdefine('BLOCKS_TABLE', $table_prefix.'blocks');^Mdefine('BOOKMARK_TABLE', $table_prefix.'bookmarks');^Mdefine('BUDDY_TABLE', $table_prefix.'contact_list');^Mdefine('BUDDYS_TABLE', $table_prefix.'buddy');^Mdefine('CATEGORIES_TABLE', $table_prefix.'categories');^Mdefine('CONFIG_TABLE', $table_prefix.'config');^Mdefine('CONTACT_TABLE', $table_prefix.'contact_list');^Mdefine('DIGEST_FORUMS_TABLE', $table_prefix.'digest_forums');^Mdefine('DIGEST_TABLE', $table_prefix.'digest');^Mdefine('DISALLOW_TABLE', $table_prefix.'disallow');^M//define('DISALLOW_TABLE', $table_prefix.'contact_list'); // Which to use? constants_contact.php^Mdefine('FORUM_TOUR_TABLE', $table_prefix.'forum_tour');^Mdefine('FORUMS_TABLE', $table_prefix.'forums');^Mdefine('GROUPS_TABLE', $table_prefix.'groups');^Mdefine('HACKS_LIST_TABLE', $table_prefix.'hacks_list');^Mdefine('IGNORE_TABLE', $table_prefix.'contact_list');^Mdefine('IM_CONFIG_TABLE', $table_prefix.'im_config');^Mdefine('IM_PREFS_TABLE', $table_prefix.'im_prefs');^Mdefine('IM_SITES_TABLE', $table_prefix.'im_sites');^Mdefine('IM_SESSIONS_TABLE', $table_prefix.'im_sessions');^Mdefine('JR_ADMIN_TABLE', $table_prefix.'jr_admin_users');^Mdefine('LAYOUT_TABLE', $table_prefix.'layout');^Mdefine('LINK_CATEGORIES_TABLE', $table_prefix.'link_categories');^Mdefine('LINK_CONFIG_TABLE', $table_prefix.'link_config');^Mdefine('LINKS_TABLE', $table_prefix.'links');^Mdefine('NEWS_TABLE', $table_prefix.'news');^Mdefine('OPTIMIZE_DB_TABLE', $table_prefix.'optimize_db');^Mdefine('PORTAL_CONFIG_TABLE', $table_prefix.'portal_config');^Mdefine('POSTS_TABLE', $table_prefix.'posts');^Mdefine('POSTS_TEXT_TABLE', $table_prefix.'posts_text');^Mdefine('PRIVMSGS_IGNORE_TABLE', $table_prefix.'privmsgs_ignore');^Mdefine('PRIVMSGS_TABLE', $table_prefix.'privmsgs');^Mdefine('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text');^Mdefine('PRUNE_TABLE', $table_prefix.'forum_prune');^Mdefine('RANKS_TABLE', $table_prefix.'ranks');^Mdefine('REFERERS_TABLE', $table_prefix.'referers');^Mdefine('RULES_TABLE', $table_prefix.'rules');^Mdefine('SEARCH_MATCH_TABLE', $table_prefix.'search_wordmatch');^Mdefine('SEARCH_TABLE', $table_prefix.'search_results');^Mdefine('SEARCH_WORD_TABLE', $table_prefix.'search_wordlist');^Mdefine('SESSIONS_TABLE', $table_prefix.'sessions');^Mdefine('SHOUTBOX_TABLE', $table_prefix.'shout');^Mdefine('SMILIES_TABLE', $table_prefix.'smilies');^Mdefine('SUBSCRIPTIONS_TABLE', $table_prefix.'mod_subscriptions');^Mdefine('SUBSCRIBED_FORUMS_TABLE', $table_prefix.'mod_subscribed_forums');^Mdefine('THEMES_NAME_TABLE', $table_prefix.'themes_name');^Mdefine('THEMES_TABLE', $table_prefix.'themes');^Mdefine('TOPICS_TABLE', $table_prefix.'topics');^Mdefine('TOPICS_WATCH_TABLE', $table_prefix.'topics_watch');^Mdefine('USER_GROUP_TABLE', $table_prefix.'user_group');^Mdefine('USERS_TABLE', $table_prefix.'users');^Mdefine('VOTE_DESC_TABLE', $table_prefix.'vote_desc');^Mdefine('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');^Mdefine('VOTE_USERS_TABLE', $table_prefix.'vote_voters');^Mdefine('WORDS_TABLE', $table_prefix.'words');^Mdefine('WPM', $table_prefix.'wpm');^M^M// ### Database Connection ###^Mdefine('BEGIN_TRANSACTION', 1);^Mdefine('END_TRANSACTION', 2);^M^M// ### Error Codes ###^Mdefine('GENERAL_MESSAGE', 200);^Mdefine('GENERAL_ERROR', 202);^Mdefine('CRITICAL_MESSAGE', 203);^Mdefine('CRITICAL_ERROR', 204);^M^M// ### Group Settings ###^Mdefine('GROUP_OPEN', 0);^Mdefine('GROUP_CLOSED', 1);^Mdefine('GROUP_HIDDEN', 2);^Mdefine('GROUP_AUTO', 3);^Mdefine('GROUP_PAYMENT', 4);^M^M// ### Page Numbers for Session Handling ###^Mdefine('PAGE_INDEX', 0);^Mdefine('PAGE_LOGIN', -1);^Mdefine('PAGE_SEARCH', -2);^Mdefine('PAGE_REGISTER', -3);^Mdefine('PAGE_PROFILE', -4);^Mdefine('PAGE_VIEWONLINE', -6);^Mdefine('PAGE_VIEWMEMBERS', -7);^Mdefine('PAGE_FAQ', -8);^Mdefine('PAGE_POSTING', -9);^Mdefine('PAGE_PRIVMSGS', -10);^Mdefine('PAGE_GROUPCP', -11);^Mdefine('PAGE_FORUM_TOUR', -12);^Mdefine('PAGE_PORTAL', -13);^Mdefine('PAGE_CARD', -14);^Mdefine('PAGE_RULES', -15);^Mdefine('PAGE_COOKIES', -16);^Mdefine('PAGE_STAFF', -17);^Mdefine('PAGE_LINKS', -18);^Mdefine('PAGE_DOWNLOAD', -19);^Mdefine('PAGE_ALBUM', -50);^Mdefine('PAGE_ALBUM_PERSONAL', -51);^Mdefine('PAGE_ALBUM_PICTURE', -52);^Mdefine('PAGE_ALBUM_SEARCH', -53);^Mdefine('PAGE_REDIRECT', -1031);^Mdefine('PAGE_SHOUTBOX_MAX', -1035);^Mdefine('PAGE_SHOUTBOX', -1035);^Mdefine('PAGE_CONTACT', -8050);^Mdefine('PAGE_PRILLIAN', -8051);^Mdefine('PAGE_TOPIC_OFFSET', 5000);^M^M// ### Points Status ###^Mdefine('POINTS_DISABLED', 1);^Mdefine('POINTS_ENABLED', 0);^M^M// ### Post Types ###^Mdefine('POST_NORMAL', 0);^Mdefine('POST_STICKY', 1);^Mdefine('POST_ANNOUNCE', 2);^Mdefine('POST_GLOBAL_ANNOUNCE', 3);^Mdefine('POST_BIRTHDAY', 9);^Mdefine('POST_CALENDAR', 10);^M^M// ### Prillian Constants ###^M// prillian installed?^Mif (defined('PRILLIAN_INSTALLED')){^Mdefine('ALLOW_BUDDY_SELF', false);^Mdefine('CONTACT_PATH', $phpbb_root_path.'mods/contact/');^Mdefine('CONTACT_URL', $phpbb_root_path.'contact.'.$phpEx);^Mdefine('IM_NEW_MAIL', 6);^Mdefine('IM_READ_MAIL', 7);^Mdefine('IM_UNREAD_MAIL', <s8><img><s8>;^Mdefine('OFF_SITE', -2);^Mdefine('OFF_SITE_USERS_URL', 'u');^Mdefine('OFF_SITE_POST_URL', 'p');^Mdefine('PRILL_PATH', $phpbb_root_path.'mods/prillian/');^Mdefine('PRILL_URL', $phpbb_root_path.'imclient.'.$phpEx);^Mdefine('MAIN_MODE', 1);^Mdefine('WIDE_MODE', 2);^Mdefine('MINI_MODE', 3);^Mdefine('FRAMES_MODE', 4);^Mdefine('NO_FRAMES_MODE', 5);^M}^M^M// ### Private Message System ###^Mdefine('PRIVMSGS_READ_MAIL', 0);^Mdefine('PRIVMSGS_NEW_MAIL', 1);^Mdefine('PRIVMSGS_SENT_MAIL', 2);^Mdefine('PRIVMSGS_SAVED_IN_MAIL', 3);^Mdefine('PRIVMSGS_SAVED_OUT_MAIL', 4);^Mdefine('PRIVMSGS_UNREAD_MAIL', 5);^M^M// ### Session Parameters ###^Mdefine('SESSION_METHOD_COOKIE', 100);^Mdefine('SESSION_METHOD_GET', 101);^M^M// ### Software Status ###^Mdefine('FORUM_UNLOCKED', 0);^Mdefine('FORUM_LOCKED', 1);^M^M// ### Topic Status ###^Mdefine('TOPIC_UNLOCKED', 0);^Mdefine('TOPIC_LOCKED', 1);^Mdefine('TOPIC_MOVED', 2);^Mdefine('TOPIC_WATCH_NOTIFIED', 1);^Mdefine('TOPIC_WATCH_UN_NOTIFIED', 0);^M^M// ### URL Parameters ###^Mdefine('POST_TOPIC_URL', 't');^Mdefine('POST_CAT_URL', 'c');^Mdefine('POST_FORUM_URL', 'f');^Mdefine('POST_USERS_URL', 'u');^Mdefine('POST_POST_URL', 'p');^Mdefine('POST_GROUPS_URL', 'g');^M^M// ### User Avatar Settings ###^Mdefine('USER_AVATAR_NONE', 0);^Mdefine('USER_AVATAR_UPLOAD', 1);^Mdefine('USER_AVATAR_REMOTE', 2);^Mdefine('USER_AVATAR_GALLERY', 3);^M^M// ### User Levels ###^Mdefine('DELETED', -1);^Mdefine('ANONYMOUS', -1);^Mdefine('USER', 0);^Mdefine('ADMIN', 1);^Mdefine('MOD', 2);^Mdefine('JADMIN', 7);^Mdefine('ADMIN_FOUNDER', 99);^Mdefine('GUEST_ONLY', 1000);^M^M// ### Special Constants ###^Mdefine('NO', 0);^Mdefine('YES', 1);^Mdefine('FRIEND_ONLY',2);^Mdefine('UNKNOWN', 0);^Mdefine('MALE', 1);^Mdefine('FEMALE', 2);^Mdefine('VIP_RANK_TITLE', 'VIP');^Mdefine('OVERIDE_THEME', false);^Mdefine('DIGEST_THEME', 1);^Mdefine('DIGEST_LOGGING', true);^Mdefine('DIGEST_SUPPORT', "http://www.phpbb.com/phpBB/viewtopic.php?t=187868");^Mdefine('DIGEST_HTML', 1);^Mdefine('DIGEST_TEXT', 0);^M^M?>
Last edited by sirap on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

sirap
Newbie
Newbie
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 15, 2006 8:25 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Mighty07 » Thu Apr 27, 2006 6:31 pm

After all the updates and fixes, i only got 2 things missing.
One is that thing about the "View posts since last visit" and the other is the daily backups.
The most important for me is the daily backups. Does anyone found a fix for this?
Last edited by Mighty07 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Mighty07
Newbie
Newbie
 
Posts: 25
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 13, 2006 12:38 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Helter » Thu Apr 27, 2006 7:04 pm

usually the daily backup is broken with the phpbb 18 or 19 update and fixed with the security mod update. Are you sure you did all the database updates? ie...update_to _latest.php, update.php...etc
Last edited by Helter on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
"Success is getting what you want. Happiness is wanting what you get." - Dale Carnegie
User avatar
Helter
Administrator
Administrator
 
Posts: 4561
Likes: 40 posts
Liked in: 116 posts
Images: 0
Joined: Sat Mar 11, 2006 4:46 pm
Cash on hand: 2,024.50
Location: Seattle Wa
IntegraMOD version: phpBB2x

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Fri Apr 28, 2006 2:06 am

"sirap";p="3367" wrote:
"found it";p="3015" wrote:
"sirap";p="2953" wrote:hi, just upgraded using premodded files..but I got this error when try to change user password in admin ACP.

phpBB : Critical Error

Error removing auto-login keys

DEBUG MODE

SQL Error : 1146 Table 'forumdb.SESSIONS_KEYS_TABLE' doesn't exist

DELETE FROM SESSIONS_KEYS_TABLE WHERE user_id = 242

Line : 533
File : sessions.php

Is anyone got the solution?
This is my sessions.php

Code: Select all
 <?php^M/***************************************************************************^M  *                                sessions.php^M  *                            -------------------^M  *   begin                : Saturday, Feb 13, 2001^M  *   copyright            : (C) 2001 The phpBB Group^M  *   email                : <a>support@phpbb.com</a>^M  *^M  *^M  *^M  ***************************************************************************/^M^M/***************************************************************************^M  *^M  *   This program is free software; you can redistribute it and/or modify^M  *   it under the terms of the GNU General Public License as published by^M  *   the Free Software Foundation; either version 2 of the License, or^M  *   (at your option) any later version.^M  *^M  ***************************************************************************/^M^M//^M// Adds/updates a new session to the database for the given userid.^M// Returns the new session ID on success.^M//^Mfunction session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0)^M{^M         global $db, $board_config;^M         global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;^M^M         $cookiename = $board_config['cookie_name'];^M         $cookiepath = $board_config['cookie_path'];^M         $cookiedomain = $board_config['cookie_domain'];^M         $cookiesecure = $board_config['cookie_secure'];^M^M         if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )^M         {^M                 $session_id = isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';^M                 $sessiondata = isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();^M                 $sessionmethod = SESSION_METHOD_COOKIE;^M         }^M         else^M         {^M                 $sessiondata = array();^M                 $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';^M                 $sessionmethod = SESSION_METHOD_GET;^M         }^M^M         if (!preg_match('/^[A-Za-z0-9]*$/', $session_id)) ^M         {^M                 $session_id = '';^M         }^M         ^M         $page_id = (int) $page_id;^M^M         global $HTTP_SERVER_VARS; ^M         if ( empty($session_id)  && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ^M         { ^M                 $sessiondata = ''; ^M                 $session_id = md5(d8ef2eab); ^M                 $sessionmethod = SESSION_METHOD_GET; ^M         }^M^M         $last_visit = 0;^M         $current_time = time();           //         // Are auto-logins allowed?         // If allow_autologin is not set or is true then they are         // (same behaviour as old 2.0.x session code)         //         if (isset($board_config['allow_autologin']) && !$board_config['allow_autologin'])         {                 $enable_autologin = $sessiondata['autologinid'] = false;         }           //         // First off attempt to join with the autologin value if we have one         // If not, just use the user_id value         //         $userdata = array();         if ($user_id != ANONYMOUS)         {         //-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------                        ^M//-- add^M                 lw_check_membership($userdata);^M//-- fin mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------                    ^M^M                 if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '' && $user_id)                 {                         $sql = 'SELECT u.*                                FROM ' . USERS_TABLE . ' u, ' . SESSIONS_KEYS_TABLE . ' k                                WHERE u.user_id = ' . (int) $user_id . "                                        AND u.user_active = 1                                        AND k.user_id = u.user_id                                        AND k.key_id = '" . md5($sessiondata['autologinid']) . "'";                         if (!($result = $db->sql_query($sql)))                         {                                 message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                         }                           $userdata = $db->sql_fetchrow($result);                         $db->sql_freeresult($result);                           $enable_autologin = $login = 1;                 }                 else if (!$auto_create)                 {                         $sessiondata['autologinid'] = '';                         $sessiondata['userid'] = $user_id;                           $sql = 'SELECT *                                FROM ' . USERS_TABLE . '                                WHERE user_id = ' . (int) $user_id . '                                        AND user_active = 1';                         if (!($result = $db->sql_query($sql)))                         {                                 message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                         }                           $userdata = $db->sql_fetchrow($result);                         $db->sql_freeresult($result);                         $login = 1;                 }         }           //         // At this point either $userdata should be populated or         // one of the below is true         // * Key didn't match one in the DB         // * User does not exist         // * User is inactive         //         if (!sizeof($userdata) || !is_array($userdata) || !$userdata)         {                 $sessiondata['autologinid'] = '';                 $sessiondata['userid'] = $user_id = ANONYMOUS;                 $enable_autologin = $login = 0;                   $sql = 'SELECT *                        FROM ' . USERS_TABLE . '                        WHERE user_id = ' . (int) $user_id;                 if (!($result = $db->sql_query($sql)))                 {                         message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                 }                   $userdata = $db->sql_fetchrow($result);                 $db->sql_freeresult($result);         }^M         //^M         // Initial ban check against user id, IP and email address^M         //^M         preg_match('/(..)(..)(..)(..)/', $user_ip, $user_ip_parts);^M^M         $sql = "SELECT ban_ip, ban_userid, ban_email ^M                FROM " . BANLIST_TABLE . " ^M                WHERE ban_ip IN ('" . $user_ip_parts[1] . $user_ip_parts[2] . $user_ip_parts[3] . $user_ip_parts[4] . "', '" . $user_ip_parts[1] . $user_ip_parts[2] . $user_                         OR ban_userid = $user_id";^M        if ( $user_id != ANONYMOUS )^M        {^M                $sql .= " OR ban_email LIKE '" . str_replace("'", "''", $userdata['user_email']) . "' ^M                         OR ban_email LIKE '" . substr(str_replace("'", "''", $userdata['user_email']), strpos(str_replace("'", "''", $userdata['user_email']), "@")) . "'";        }^M        if ( !($result = $db->sql_query($sql)) )^M        {^M                message_die(CRITICAL_ERROR, 'Could not obtain ban information', '', __LINE__, __FILE__, $sql);^M        }^M^M        if ( $ban_info = $db->sql_fetchrow($result) )^M        {^M                if ( $ban_info['ban_ip'] || $ban_info['ban_userid'] || $ban_info['ban_email'] )^M                {^M                        message_die(CRITICAL_MESSAGE, 'You_been_banned');^M                }^M        }^M^M        //^M        // Create or update the session^M        //^M        $sql = "UPDATE " . SESSIONS_TABLE . "^M                 SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login, session_adm                 WHERE session_id = '" . $session_id . "' ^M                         AND session_ip = '$user_ip'";^M        if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )^M        {^M                        $session_id = md5(dss_rand());^M                ^M                global $HTTP_SERVER_VARS; ^M                $session_id = ( !strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ? md5(uniqid(mt_rand(), true)) : md5(d8ef2eab);^M^M                $sql = "INSERT INTO " . SESSIONS_TABLE . "^M                         (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin)^M                         VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin)";^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);^M                }^M        }^M^M        if ( $user_id != ANONYMOUS )^M        {                $last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time; ^M               ^M                if (!$admin)^M                {^M^M                $sql = "UPDATE " . USERS_TABLE . " ^M                         SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit^M                         WHERE user_id = $user_id";^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);^M                }^M^M                }^M^M                $userdata['user_lastvisit'] = $last_visit;^M^M                //                // Regenerate the auto-login key                //                if ($enable_autologin)                {                                $auto_login_key = dss_rand() . dss_rand();                          if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '')                        {                                $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . "                                         SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time                                         WHERE key_id = '" . md5($sessiondata['autologinid']) . "'";                        }                        else                        {                                $sql = 'INSERT INTO ' . SESSIONS_KEYS_TABLE . "(key_id, user_id, last_ip, last_login)                                         VALUES ('" . md5($auto_login_key) . "', $user_id, '$user_ip', $current_time)";                        }                          if ( !$db->sql_query($sql) )                        {                                message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);                        }                          $sessiondata['autologinid'] = $auto_login_key;                        unset($auto_login_key);                }                else                {                        $sessiondata['autologinid'] = '';                }  //              $sessiondata['autologinid'] = (!$admin) ? (( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '') : $sessiondata['autologin                $sessiondata['userid'] = $user_id;^M        }^M^M        $userdata['session_id'] = $session_id;^M        $userdata['session_ip'] = $user_ip;^M        $userdata['session_user_id'] = $user_id;^M        $userdata['session_logged_in'] = $login;^M        $userdata['session_page'] = $page_id;^M        $userdata['session_start'] = $current_time;^M        $userdata['session_time'] = $current_time;^M        $userdata['session_admin'] = $admin;^M        $userdata['session_key'] = $sessiondata['autologinid'];^M        setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M        setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);^M^M        $SID = 'sid=' . $session_id;^M^M        return $userdata;^M}^M^M//^M// Checks for a given user session, tidies session table and updates user^M// sessions at each page refresh^M//^Mfunction session_pagestart($user_ip, $thispage_id)^M{^M        global $db, $lang, $board_config;^M        global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;^M^M        $cookiename = $board_config['cookie_name'];^M        $cookiepath = $board_config['cookie_path'];^M        $cookiedomain = $board_config['cookie_domain'];^M        $cookiesecure = $board_config['cookie_secure'];^M^M        $current_time = time();^M        unset($userdata);^M^M        if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )^M        {^M                $sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename . '_data'] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();^M                $session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';^M                $sessionmethod = SESSION_METHOD_COOKIE;^M        }^M        else^M        {^M                $sessiondata = array();^M                $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';^M                $sessionmethod = SESSION_METHOD_GET;^M        }^M^M        if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))^M        {^M                $session_id = '';^M        }^M^M        global $HTTP_SERVER_VARS; ^M        if ( empty($session_id)  && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ^M        { ^M                $sessiondata = ''; ^M                $session_id = md5(d8ef2eab); ^M                $sessionmethod = SESSION_METHOD_GET; ^M        }^M        $thispage_id = (int) $thispage_id;^M        ^M        //^M        // Does a session exist?^M        //^M        if ( !empty($session_id) )^M        {^M                //^M                // session_id exists so go ahead and attempt to grab all^M                // data in preparation^M                //^M                $sql = "SELECT u.*, s.*^M                         FROM " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u^M                         WHERE s.session_id = '$session_id'^M                                 AND u.user_id = s.session_user_id";^M                if ( !($result = $db->sql_query($sql)) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);^M                }^M^M                $userdata = $db->sql_fetchrow($result);^M^M                //^M                // Did the session exist in the DB?^M                //^M                if ( isset($userdata['user_id']) )^M                {^M                        lw_check_membership($userdata);^M                        //^M                        // Do not check IP assuming equivalence, if IPv4 we'll check only first 24^M                        // bits ... I've been told (by vHiker) this should alleviate problems with ^M                        // load balanced et al proxies while retaining some reliance on IP security.^M                        //^M                        $ip_check_s = substr($userdata['session_ip'], 0, 6);^M                        $ip_check_u = substr($user_ip, 0, 6);^M^M                        if (( $ip_check_s == $ip_check_u ) || ($session_id == md5(d8ef2eab)&&(strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot'))))^M                        {^M                                $SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';^M^M                                //^M                                // Only update session DB a minute or so after last update^M                                //^M                                if ( $current_time - $userdata['session_time'] > 60 )^M                                {^M                                        // A little trick to reset session_admin on session re-usage^M                                        $update_admin = (!defined('IN_ADMIN') && $current_time - $userdata['session_time'] > ($board_config['session_length']+60)) ? ', sessi^M                                        $sql = "UPDATE " . SESSIONS_TABLE . " ^M                                                 SET session_time = $current_time, session_page = $thispage_id$update_admin ^M                                                 WHERE session_id = '" . $userdata['session_id'] . "'";^M                                        if ( !$db->sql_query($sql) )^M                                        }^M^M                                        if ( $userdata['user_id'] != ANONYMOUS )^M                                        {^M                                                $sql = "UPDATE " . USERS_TABLE . " ^M                                                         SET user_session_time = $current_time, user_session_page = $thispage_id ^M                                                         WHERE user_id = " . $userdata['user_id'];^M                                                if ( !$db->sql_query($sql) )^M                                                {^M                                                        message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);^M                                                }^M                                        }^M^M                                        session_clean($userdata['session_id']);^M                                        setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M                                        setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);^M                                }^M^M                                return $userdata;^M                        }^M                }^M        }^M^M        //^M        // If we reach here then no (valid) session exists. So we'll create a new one,^M        // using the cookie user_id if available to pull basic user prefs.^M        //^M        $user_id = ( isset($sessiondata['userid']) ) ? intval($sessiondata['userid']) : ANONYMOUS;^M^M        if ( !($userdata = session_begin($user_id, $user_ip, $thispage_id, TRUE)) )^M        {^M                message_die(CRITICAL_ERROR, 'Error creating user session', '', __LINE__, __FILE__, $sql);^M        }^M^M        return $userdata;^M^M}^M^M/*** Terminates the specified session* It will delete the entry in the sessions table for this session,* remove the corresponding auto-login key and reset the cookies*/function session_end($session_id, $user_id){        global $db, $lang, $board_config, $userdata;        global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;          $cookiename = $board_config['cookie_name'];        $cookiepath = $board_config['cookie_path'];        $cookiedomain = $board_config['cookie_domain'];        $cookiesecure = $board_config['cookie_secure'];          $current_time = time();          if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))        {                return;        }          //        // Delete existing session        //        $sql = 'DELETE FROM ' . SESSIONS_TABLE . "                 WHERE session_id = '$session_id'                         AND session_user_id = $user_id";        if ( !$db->sql_query($sql) )        {                message_die(CRITICAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql);        }          //        // Remove this auto-login entry (if applicable)        //        if ( isset($userdata['session_key']) && $userdata['session_key'] != '' )        {                $autologin_key = md5($userdata['session_key']);                $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '                        WHERE user_id = ' . (int) $user_id . "                                 AND key_id = '$autologin_key'";                if ( !$db->sql_query($sql) )                {                        message_die(CRITICAL_ERROR, 'Error removing auto-login key', '', __LINE__, __FILE__, $sql);                }        }          //        // We expect that message_die will be called after this function,        // but just in case it isn't, reset $userdata to the details for a guest        //        $sql = 'SELECT *                FROM ' . USERS_TABLE . '                WHERE user_id = ' . ANONYMOUS;        if ( !($result = $db->sql_query($sql)) )        {                message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);        }        if ( !($userdata = $db->sql_fetchrow($result)) )        {                message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);        }        $db->sql_freeresult($result);            setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);        setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);          return true;}  /*** Removes expired sessions and auto-login keys from the database*/function session_clean($session_id){        global $board_config, $db;          //        // Delete expired sessions        //        $sql = "DELETE FROM " . SESSIONS_TABLE . " ^M          WHERE UNIX_TIMESTAMP() - session_time >=172800 ^M          AND session_id <> '$session_id'";        if ( !$db->sql_query($sql) )        {                message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql);        }          //        // Delete expired auto-login keys        // If max_autologin_time is not set then keys will never be deleted        // (same behaviour as old 2.0.x session code)        //        if (!empty($board_config['max_autologin_time']) && $board_config['max_autologin_time'] > 0)        {                $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '                        WHERE last_login <time>sql_query($sql);        }          return true;^M        }^M^M/**^M* Reset all login keys for the specified user^M* Called on password changes^M*/^Mfunction session_reset_keys($user_id, $user_ip)^M{^M        global $db, $userdata;^M^M        $key_sql = ($user_id == $userdata['user_id'] && !empty($userdata['session_key'])) ? "AND key_id != '" . md5($userdata['session_key']) . "'" : '';^M^M        $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '^M                WHERE user_id = ' . (int) $user_id . "^M                         $key_sql";^M^M        if ( !$db->sql_query($sql) )^M        {^M                message_die(CRITICAL_ERROR, 'Error removing auto-login keys', '', __LINE__, __FILE__, $sql);^M        }^M^M        $where_sql = 'session_user_id = ' . (int) $user_id;^M        $where_sql .= ($user_id == $userdata['user_id']) ? " AND session_id <userdata>sql_query($sql) )^M        {^M                message_die(CRITICAL_ERROR, 'Error removing user session(s)', '', __LINE__, __FILE__, $sql);^M        }^M^M        if ( !empty($key_sql) )^M        {^M                $auto_login_key = dss_rand() . dss_rand();^M^M                $current_time = time();^M                ^M                $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . "^M                         SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time^M                         WHERE key_id = '" . md5($userdata['session_key']) . "'";^M                ^M                if ( !$db->sql_query($sql) )^M                {^M                        message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);^M                }^M^M                // And now rebuild the cookie^M                $sessiondata['userid'] = $user_id;^M                $sessiondata['autologinid'] = $autologin_id;^M                $cookiename = $board_config['cookie_name'];^M                $cookiepath = $board_config['cookie_path'];^M                $cookiedomain = $board_config['cookie_domain'];^M                $cookiesecure = $board_config['cookie_secure'];^M^M                setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M                ^M                $userdata['session_key'] = $auto_login_key;^M                unset($sessiondata);^M                unset($auto_login_key);^M        }}^M//^M// Append $SID to a url. Borrowed from phplib and modified. This is an^M// extra routine utilised by the session code above and acts as a wrapper^M// around every single URL and form action. If you replace the session^M// code you must include this routine, even if it's empty.^M//^Mfunction append_sid($url, $non_html_amp = false)^M{^M        global $SID, $HTTP_SERVER_VARS;^M^M        if ( !empty($SID) && !preg_match('#sid=#', $url) && !defined('IS_ROBOT')  )^M        {^M                $url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;        }^M^M        return $url;^M}^M^M?>  


Thanks in advance.


Hi

Did you do the upgrade from 2.0.17 to 2.0.18 as that is error is a result in constant.php as the code edits are not done....

Can you show me your includes/constants.php



If I'm not mistaken I did upgrade from 2.0.17 to 2.0.18...BTW, here is my constants.php
Code: Select all
<?php^M// <ID>^M// +---------------+-------------------------------+-----------+^M// | IntegraMOD v1 |    ? 2005 IntegraMOD Group    |  {1.4.0}  |^M// +---------------+-------------------------------+-----------+^M// | Filename      | constants.php                             |^M// | Created By    | phpBB Group                               |^M// | Created On    | February 13, 2001                         |^M// | Copyright     | ? 2005 phpBB Group                        |^M// | License       | GNU-GPL v2 [http://gpl.integramod.org]    |^M// +---------------+-------------------------------------------+^M// |      DO NOT MODIFY/REMOVE ANTHING ABOVE THIS LINE!!!      |^M// +-----------------------------------------------------------+^M^M// *************************************************************^M// ****************** Begin Protecting Script ******************^M// *************************************************************^M/*^Mif (!defined('IM_LOADER') or !IM_LOADER or !defined('IM_GLOBALS') or !IM_GLOBALS)^M{^M         die('<p><strong>Access Denied:</strong> This file ('.basename(__FILE__).') cannot be accessed directly.</p>');^M}^M*/^M^M// *************************************************************^M// ******************* Set Global Constants ********************^M// *************************************************************^M// ### Debug Level -- To turn off, set to 0. ###^Mdefine('DEBUG', 1);^M^M// ### Account Activation Settings ###^Mdefine('USER_ACTIVATION_NONE', 0);^Mdefine('USER_ACTIVATION_SELF', 1);^Mdefine('USER_ACTIVATION_ADMIN', 2);^M^M// ### Album Constants ###^Mdefine('ALBUM_ANONYMOUS', -1);^Mdefine('ALBUM_GUEST', -1);^Mdefine('ALBUM_USER', 0);^Mdefine('ALBUM_ADMIN', 1);^Mdefine('ALBUM_MOD', 2);^Mdefine('ALBUM_PRIVATE', 3);^M// --------------------^Mdefine('ALBUM_UPLOAD_PATH', 'album_mod/upload/');^Mdefine('ALBUM_CACHE_PATH', 'album_mod/upload/cache/');^Mdefine('ALBUM_MED_CACHE_PATH', 'album_mod/upload/med_cache/');^M// --------------------^Mdefine('ALBUM_NAV_ARROW', ' &raquo; ');^Mdefine('ALBUM_ROOT_CATEGORY', -1);^M// --------------------^Mdefine('PERSONAL_GALLERY', 0);^M^M^M// ### Auth Settings ###^Mdefine('AUTH_LIST_ALL', 0);^Mdefine('AUTH_ALL', 0);^M// --------------------^Mdefine('AUTH_REG', 1);^Mdefine('AUTH_ACL', 2);^Mdefine('AUTH_MOD', 3);^Mdefine('AUTH_ADMIN', 5);^M// --------------------^Mdefine('AUTH_VIEW', 1);^Mdefine('AUTH_READ', 2);^Mdefine('AUTH_POST', 3);^Mdefine('AUTH_REPLY', 4);^Mdefine('AUTH_EDIT', 5);^Mdefine('AUTH_DELETE', 6);^Mdefine('AUTH_ANNOUNCE', 7);^Mdefine('AUTH_STICKY', <s8><img><s8>;^Mdefine('AUTH_POLLCREATE', 9);^Mdefine('AUTH_VOTE', 10);^Mdefine('AUTH_ATTACH', 11);^Mdefine('AUTH_DELAYEDPOST', 12);^Mdefine('AUTH_CAL', 20);^Mdefine('AUTH_GLOBAL_ANNOUNCE', 21);^Mdefine('AUTH_PAID_VIEW', 25);^M^M// ### Data Tables ###^Mdefine('ACCT_HIST_TABLE', $table_prefix.'account_hist');^Mdefine('ACRONYMS_TABLE', $table_prefix.'acronyms');^Mdefine('ADMIN_PM_TABLE', $table_prefix.'admin_pm');^Mdefine('ALBUM_CAT_TABLE', $table_prefix.'album_cat');^Mdefine('ALBUM_COMMENT_TABLE', $table_prefix.'album_comment');^Mdefine('ALBUM_CONFIG_TABLE', $table_prefix.'album_config');^Mdefine('ALBUM_RATE_TABLE', $table_prefix.'album_rate');^Mdefine('ALBUM_SP_CONFIG_TABLE', $table_prefix.'album_sp_config');^Mdefine('ALBUM_TABLE', $table_prefix.'album');^Mdefine('APPROVE_FORUMS_TABLE', $table_prefix.'approve_forums');^Mdefine('APPROVE_POSTS_TABLE', $table_prefix.'approve_posts');^Mdefine('APPROVE_TOPICS_TABLE', $table_prefix.'approve_topics');^Mdefine('APPROVE_USERS_TABLE', $table_prefix.'approve_users');^Mdefine('AUTH_ACCESS_TABLE', $table_prefix.'auth_access');^Mdefine('BANNER_STATS_TABLE', $table_prefix.'banner_stats');^Mdefine('BANNERS_TABLE', $table_prefix.'banner');^Mdefine('BANLIST_TABLE', $table_prefix.'banlist');^Mdefine('BLOCK_POSITION_TABLE', $table_prefix.'block_position');^Mdefine('BLOCK_VARIABLE_TABLE', $table_prefix.'block_variable');^Mdefine('BLOCKS_TABLE', $table_prefix.'blocks');^Mdefine('BOOKMARK_TABLE', $table_prefix.'bookmarks');^Mdefine('BUDDY_TABLE', $table_prefix.'contact_list');^Mdefine('BUDDYS_TABLE', $table_prefix.'buddy');^Mdefine('CATEGORIES_TABLE', $table_prefix.'categories');^Mdefine('CONFIG_TABLE', $table_prefix.'config');^Mdefine('CONTACT_TABLE', $table_prefix.'contact_list');^Mdefine('DIGEST_FORUMS_TABLE', $table_prefix.'digest_forums');^Mdefine('DIGEST_TABLE', $table_prefix.'digest');^Mdefine('DISALLOW_TABLE', $table_prefix.'disallow');^M//define('DISALLOW_TABLE', $table_prefix.'contact_list'); // Which to use? constants_contact.php^Mdefine('FORUM_TOUR_TABLE', $table_prefix.'forum_tour');^Mdefine('FORUMS_TABLE', $table_prefix.'forums');^Mdefine('GROUPS_TABLE', $table_prefix.'groups');^Mdefine('HACKS_LIST_TABLE', $table_prefix.'hacks_list');^Mdefine('IGNORE_TABLE', $table_prefix.'contact_list');^Mdefine('IM_CONFIG_TABLE', $table_prefix.'im_config');^Mdefine('IM_PREFS_TABLE', $table_prefix.'im_prefs');^Mdefine('IM_SITES_TABLE', $table_prefix.'im_sites');^Mdefine('IM_SESSIONS_TABLE', $table_prefix.'im_sessions');^Mdefine('JR_ADMIN_TABLE', $table_prefix.'jr_admin_users');^Mdefine('LAYOUT_TABLE', $table_prefix.'layout');^Mdefine('LINK_CATEGORIES_TABLE', $table_prefix.'link_categories');^Mdefine('LINK_CONFIG_TABLE', $table_prefix.'link_config');^Mdefine('LINKS_TABLE', $table_prefix.'links');^Mdefine('NEWS_TABLE', $table_prefix.'news');^Mdefine('OPTIMIZE_DB_TABLE', $table_prefix.'optimize_db');^Mdefine('PORTAL_CONFIG_TABLE', $table_prefix.'portal_config');^Mdefine('POSTS_TABLE', $table_prefix.'posts');^Mdefine('POSTS_TEXT_TABLE', $table_prefix.'posts_text');^Mdefine('PRIVMSGS_IGNORE_TABLE', $table_prefix.'privmsgs_ignore');^Mdefine('PRIVMSGS_TABLE', $table_prefix.'privmsgs');^Mdefine('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text');^Mdefine('PRUNE_TABLE', $table_prefix.'forum_prune');^Mdefine('RANKS_TABLE', $table_prefix.'ranks');^Mdefine('REFERERS_TABLE', $table_prefix.'referers');^Mdefine('RULES_TABLE', $table_prefix.'rules');^Mdefine('SEARCH_MATCH_TABLE', $table_prefix.'search_wordmatch');^Mdefine('SEARCH_TABLE', $table_prefix.'search_results');^Mdefine('SEARCH_WORD_TABLE', $table_prefix.'search_wordlist');^Mdefine('SESSIONS_TABLE', $table_prefix.'sessions');^Mdefine('SHOUTBOX_TABLE', $table_prefix.'shout');^Mdefine('SMILIES_TABLE', $table_prefix.'smilies');^Mdefine('SUBSCRIPTIONS_TABLE', $table_prefix.'mod_subscriptions');^Mdefine('SUBSCRIBED_FORUMS_TABLE', $table_prefix.'mod_subscribed_forums');^Mdefine('THEMES_NAME_TABLE', $table_prefix.'themes_name');^Mdefine('THEMES_TABLE', $table_prefix.'themes');^Mdefine('TOPICS_TABLE', $table_prefix.'topics');^Mdefine('TOPICS_WATCH_TABLE', $table_prefix.'topics_watch');^Mdefine('USER_GROUP_TABLE', $table_prefix.'user_group');^Mdefine('USERS_TABLE', $table_prefix.'users');^Mdefine('VOTE_DESC_TABLE', $table_prefix.'vote_desc');^Mdefine('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');^Mdefine('VOTE_USERS_TABLE', $table_prefix.'vote_voters');^Mdefine('WORDS_TABLE', $table_prefix.'words');^Mdefine('WPM', $table_prefix.'wpm');^M^M// ### Database Connection ###^Mdefine('BEGIN_TRANSACTION', 1);^Mdefine('END_TRANSACTION', 2);^M^M// ### Error Codes ###^Mdefine('GENERAL_MESSAGE', 200);^Mdefine('GENERAL_ERROR', 202);^Mdefine('CRITICAL_MESSAGE', 203);^Mdefine('CRITICAL_ERROR', 204);^M^M// ### Group Settings ###^Mdefine('GROUP_OPEN', 0);^Mdefine('GROUP_CLOSED', 1);^Mdefine('GROUP_HIDDEN', 2);^Mdefine('GROUP_AUTO', 3);^Mdefine('GROUP_PAYMENT', 4);^M^M// ### Page Numbers for Session Handling ###^Mdefine('PAGE_INDEX', 0);^Mdefine('PAGE_LOGIN', -1);^Mdefine('PAGE_SEARCH', -2);^Mdefine('PAGE_REGISTER', -3);^Mdefine('PAGE_PROFILE', -4);^Mdefine('PAGE_VIEWONLINE', -6);^Mdefine('PAGE_VIEWMEMBERS', -7);^Mdefine('PAGE_FAQ', -8);^Mdefine('PAGE_POSTING', -9);^Mdefine('PAGE_PRIVMSGS', -10);^Mdefine('PAGE_GROUPCP', -11);^Mdefine('PAGE_FORUM_TOUR', -12);^Mdefine('PAGE_PORTAL', -13);^Mdefine('PAGE_CARD', -14);^Mdefine('PAGE_RULES', -15);^Mdefine('PAGE_COOKIES', -16);^Mdefine('PAGE_STAFF', -17);^Mdefine('PAGE_LINKS', -18);^Mdefine('PAGE_DOWNLOAD', -19);^Mdefine('PAGE_ALBUM', -50);^Mdefine('PAGE_ALBUM_PERSONAL', -51);^Mdefine('PAGE_ALBUM_PICTURE', -52);^Mdefine('PAGE_ALBUM_SEARCH', -53);^Mdefine('PAGE_REDIRECT', -1031);^Mdefine('PAGE_SHOUTBOX_MAX', -1035);^Mdefine('PAGE_SHOUTBOX', -1035);^Mdefine('PAGE_CONTACT', -8050);^Mdefine('PAGE_PRILLIAN', -8051);^Mdefine('PAGE_TOPIC_OFFSET', 5000);^M^M// ### Points Status ###^Mdefine('POINTS_DISABLED', 1);^Mdefine('POINTS_ENABLED', 0);^M^M// ### Post Types ###^Mdefine('POST_NORMAL', 0);^Mdefine('POST_STICKY', 1);^Mdefine('POST_ANNOUNCE', 2);^Mdefine('POST_GLOBAL_ANNOUNCE', 3);^Mdefine('POST_BIRTHDAY', 9);^Mdefine('POST_CALENDAR', 10);^M^M// ### Prillian Constants ###^M// prillian installed?^Mif (defined('PRILLIAN_INSTALLED')){^Mdefine('ALLOW_BUDDY_SELF', false);^Mdefine('CONTACT_PATH', $phpbb_root_path.'mods/contact/');^Mdefine('CONTACT_URL', $phpbb_root_path.'contact.'.$phpEx);^Mdefine('IM_NEW_MAIL', 6);^Mdefine('IM_READ_MAIL', 7);^Mdefine('IM_UNREAD_MAIL', <s8><img><s8>;^Mdefine('OFF_SITE', -2);^Mdefine('OFF_SITE_USERS_URL', 'u');^Mdefine('OFF_SITE_POST_URL', 'p');^Mdefine('PRILL_PATH', $phpbb_root_path.'mods/prillian/');^Mdefine('PRILL_URL', $phpbb_root_path.'imclient.'.$phpEx);^Mdefine('MAIN_MODE', 1);^Mdefine('WIDE_MODE', 2);^Mdefine('MINI_MODE', 3);^Mdefine('FRAMES_MODE', 4);^Mdefine('NO_FRAMES_MODE', 5);^M}^M^M// ### Private Message System ###^Mdefine('PRIVMSGS_READ_MAIL', 0);^Mdefine('PRIVMSGS_NEW_MAIL', 1);^Mdefine('PRIVMSGS_SENT_MAIL', 2);^Mdefine('PRIVMSGS_SAVED_IN_MAIL', 3);^Mdefine('PRIVMSGS_SAVED_OUT_MAIL', 4);^Mdefine('PRIVMSGS_UNREAD_MAIL', 5);^M^M// ### Session Parameters ###^Mdefine('SESSION_METHOD_COOKIE', 100);^Mdefine('SESSION_METHOD_GET', 101);^M^M// ### Software Status ###^Mdefine('FORUM_UNLOCKED', 0);^Mdefine('FORUM_LOCKED', 1);^M^M// ### Topic Status ###^Mdefine('TOPIC_UNLOCKED', 0);^Mdefine('TOPIC_LOCKED', 1);^Mdefine('TOPIC_MOVED', 2);^Mdefine('TOPIC_WATCH_NOTIFIED', 1);^Mdefine('TOPIC_WATCH_UN_NOTIFIED', 0);^M^M// ### URL Parameters ###^Mdefine('POST_TOPIC_URL', 't');^Mdefine('POST_CAT_URL', 'c');^Mdefine('POST_FORUM_URL', 'f');^Mdefine('POST_USERS_URL', 'u');^Mdefine('POST_POST_URL', 'p');^Mdefine('POST_GROUPS_URL', 'g');^M^M// ### User Avatar Settings ###^Mdefine('USER_AVATAR_NONE', 0);^Mdefine('USER_AVATAR_UPLOAD', 1);^Mdefine('USER_AVATAR_REMOTE', 2);^Mdefine('USER_AVATAR_GALLERY', 3);^M^M// ### User Levels ###^Mdefine('DELETED', -1);^Mdefine('ANONYMOUS', -1);^Mdefine('USER', 0);^Mdefine('ADMIN', 1);^Mdefine('MOD', 2);^Mdefine('JADMIN', 7);^Mdefine('ADMIN_FOUNDER', 99);^Mdefine('GUEST_ONLY', 1000);^M^M// ### Special Constants ###^Mdefine('NO', 0);^Mdefine('YES', 1);^Mdefine('FRIEND_ONLY',2);^Mdefine('UNKNOWN', 0);^Mdefine('MALE', 1);^Mdefine('FEMALE', 2);^Mdefine('VIP_RANK_TITLE', 'VIP');^Mdefine('OVERIDE_THEME', false);^Mdefine('DIGEST_THEME', 1);^Mdefine('DIGEST_LOGGING', true);^Mdefine('DIGEST_SUPPORT', "http://www.phpbb.com/phpBB/viewtopic.php?t=187868");^Mdefine('DIGEST_HTML', 1);^Mdefine('DIGEST_TEXT', 0);^M^M?>


Hi

you are missing a line form your constants.php

you need to find

Code: Select all
define('SESSIONS_TABLE', $table_prefix.'sessions');


and add after

Code: Select all
define('SESSIONS_KEYS_TABLE', $table_prefix.'sessions_keys');  


i hope that helps

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: sirap » Fri Apr 28, 2006 2:23 am

"found it";p="3397" wrote:
"sirap";p="3367" wrote:
"found it";p="3015" wrote:
"sirap";p="2953" wrote:hi, just upgraded using premodded files..but I got this error when try to change user password in admin ACP.

phpBB : Critical Error

Error removing auto-login keys

DEBUG MODE

SQL Error : 1146 Table 'forumdb.SESSIONS_KEYS_TABLE' doesn't exist

DELETE FROM SESSIONS_KEYS_TABLE WHERE user_id = 242

Line : 533
File : sessions.php

Is anyone got the solution?
This is my sessions.php

Code: Select all
 &lt;?php^M/***************************************************************************^M  *                                sessions.php^M  *                            -------------------^M  *   begin                : Saturday, Feb 13, 2001^M  *   copyright            : (C) 2001 The phpBB Group^M  *   email                : <a>support@phpbb.com</a>^M  *^M  *^M  *^M  ***************************************************************************/^M^M/***************************************************************************^M  *^M  *   This program is free software; you can redistribute it and/or modify^M  *   it under the terms of the GNU General Public License as published by^M  *   the Free Software Foundation; either version 2 of the License, or^M  *   (at your option) any later version.^M  *^M  ***************************************************************************/^M^M//^M// Adds/updates a new session to the database for the given userid.^M// Returns the new session ID on success.^M//^Mfunction session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0)^M{^M         global $db, $board_config;^M         global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;^M^M         $cookiename = $board_config['cookie_name'];^M         $cookiepath = $board_config['cookie_path'];^M         $cookiedomain = $board_config['cookie_domain'];^M         $cookiesecure = $board_config['cookie_secure'];^M^M         if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )^M         {^M                 $session_id = isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';^M                 $sessiondata = isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();^M                 $sessionmethod = SESSION_METHOD_COOKIE;^M         }^M         else^M         {^M                 $sessiondata = array();^M                 $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';^M                 $sessionmethod = SESSION_METHOD_GET;^M         }^M^M         if (!preg_match('/^[A-Za-z0-9]*$/', $session_id)) ^M         {^M                 $session_id = '';^M         }^M         ^M         $page_id = (int) $page_id;^M^M         global $HTTP_SERVER_VARS; ^M         if ( empty($session_id)  && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ^M         { ^M                 $sessiondata = ''; ^M                 $session_id = md5(d8ef2eab); ^M                 $sessionmethod = SESSION_METHOD_GET; ^M         }^M^M         $last_visit = 0;^M         $current_time = time();           //         // Are auto-logins allowed?         // If allow_autologin is not set or is true then they are         // (same behaviour as old 2.0.x session code)         //         if (isset($board_config['allow_autologin']) && !$board_config['allow_autologin'])         {                 $enable_autologin = $sessiondata['autologinid'] = false;         }           //         // First off attempt to join with the autologin value if we have one         // If not, just use the user_id value         //         $userdata = array();         if ($user_id != ANONYMOUS)         {         //-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------                        ^M//-- add^M                 lw_check_membership($userdata);^M//-- fin mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------                    ^M^M                 if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '' && $user_id)                 {                         $sql = 'SELECT u.*                                FROM ' . USERS_TABLE . ' u, ' . SESSIONS_KEYS_TABLE . ' k                                WHERE u.user_id = ' . (int) $user_id . &quot;                                         AND u.user_active = 1                                         AND k.user_id = u.user_id                                         AND k.key_id = '&quot; . md5($sessiondata['autologinid']) . &quot;'&quot;;                         if (!($result = $db-&gt;sql_query($sql)))                         {                                 message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                         }                           $userdata = $db-&gt;sql_fetchrow($result);                         $db-&gt;sql_freeresult($result);                           $enable_autologin = $login = 1;                 }                 else if (!$auto_create)                 {                         $sessiondata['autologinid'] = '';                         $sessiondata['userid'] = $user_id;                           $sql = 'SELECT *                                FROM ' . USERS_TABLE . '                                WHERE user_id = ' . (int) $user_id . '                                        AND user_active = 1';                         if (!($result = $db-&gt;sql_query($sql)))                         {                                 message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                         }                           $userdata = $db-&gt;sql_fetchrow($result);                         $db-&gt;sql_freeresult($result);                         $login = 1;                 }         }           //         // At this point either $userdata should be populated or         // one of the below is true         // * Key didn't match one in the DB         // * User does not exist         // * User is inactive         //         if (!sizeof($userdata) || !is_array($userdata) || !$userdata)         {                 $sessiondata['autologinid'] = '';                 $sessiondata['userid'] = $user_id = ANONYMOUS;                 $enable_autologin = $login = 0;                   $sql = 'SELECT *                        FROM ' . USERS_TABLE . '                        WHERE user_id = ' . (int) $user_id;                 if (!($result = $db-&gt;sql_query($sql)))                 {                         message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);                 }                   $userdata = $db-&gt;sql_fetchrow($result);                 $db-&gt;sql_freeresult($result);         }^M         //^M         // Initial ban check against user id, IP and email address^M         //^M         preg_match('/(..)(..)(..)(..)/', $user_ip, $user_ip_parts);^M^M         $sql = &quot;SELECT ban_ip, ban_userid, ban_email ^M                 FROM &quot; . BANLIST_TABLE . &quot; ^M                 WHERE ban_ip IN ('&quot; . $user_ip_parts[1] . $user_ip_parts[2] . $user_ip_parts[3] . $user_ip_parts[4] . &quot;', '&quot; . $user_ip_parts[1] . $user_ip_parts[2] . $user_                        OR ban_userid = $user_id&quot;;^M        if ( $user_id != ANONYMOUS )^M        {^M                $sql .= &quot; OR ban_email LIKE '&quot; . str_replace(&quot;'&quot;, &quot;''&quot;, $userdata['user_email']) . &quot;' ^M                         OR ban_email LIKE '&quot; . substr(str_replace(&quot;'&quot;, &quot;''&quot;, $userdata['user_email']), strpos(str_replace(&quot;'&quot;, &quot;''&quot;, $userdata['user_email']), &quot;@&quot;)) . &quot;'&quot;;         }^M         if ( !($result = $db-&gt;sql_query($sql)) )^M         {^M                 message_die(CRITICAL_ERROR, 'Could not obtain ban information', '', __LINE__, __FILE__, $sql);^M         }^M^M         if ( $ban_info = $db-&gt;sql_fetchrow($result) )^M         {^M                 if ( $ban_info['ban_ip'] || $ban_info['ban_userid'] || $ban_info['ban_email'] )^M                 {^M                         message_die(CRITICAL_MESSAGE, 'You_been_banned');^M                 }^M         }^M^M         //^M         // Create or update the session^M         //^M         $sql = &quot;UPDATE &quot; . SESSIONS_TABLE . &quot;^M                 SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login, session_adm                 WHERE session_id = '&quot; . $session_id . &quot;' ^M                         AND session_ip = '$user_ip'&quot;;^M         if ( !$db-&gt;sql_query($sql) || !$db-&gt;sql_affectedrows() )^M         {^M                         $session_id = md5(dss_rand());^M                 ^M                 global $HTTP_SERVER_VARS; ^M                 $session_id = ( !strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ? md5(uniqid(mt_rand(), true)) : md5(d8ef2eab);^M^M                 $sql = &quot;INSERT INTO &quot; . SESSIONS_TABLE . &quot;^M                         (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin)^M                         VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin)&quot;;^M                 if ( !$db-&gt;sql_query($sql) )^M                 {^M                         message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);^M                 }^M         }^M^M         if ( $user_id != ANONYMOUS )^M         {                 $last_visit = ( $userdata['user_session_time'] &gt; 0 ) ? $userdata['user_session_time'] : $current_time; ^M                ^M                 if (!$admin)^M                 {^M^M                 $sql = &quot;UPDATE &quot; . USERS_TABLE . &quot; ^M                         SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit^M                         WHERE user_id = $user_id&quot;;^M                 if ( !$db-&gt;sql_query($sql) )^M                 {^M                         message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);^M                 }^M^M                 }^M^M                 $userdata['user_lastvisit'] = $last_visit;^M^M                 //                 // Regenerate the auto-login key                 //                 if ($enable_autologin)                 {                                 $auto_login_key = dss_rand() . dss_rand();                           if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '')                         {                                 $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . &quot;                                         SET last_ip = '$user_ip', key_id = '&quot; . md5($auto_login_key) . &quot;', last_login = $current_time                                         WHERE key_id = '&quot; . md5($sessiondata['autologinid']) . &quot;'&quot;;                         }                         else                         {                                 $sql = 'INSERT INTO ' . SESSIONS_KEYS_TABLE . &quot;(key_id, user_id, last_ip, last_login)                                         VALUES ('&quot; . md5($auto_login_key) . &quot;', $user_id, '$user_ip', $current_time)&quot;;                         }                           if ( !$db-&gt;sql_query($sql) )                         {                                 message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);                         }                           $sessiondata['autologinid'] = $auto_login_key;                         unset($auto_login_key);                 }                 else                 {                         $sessiondata['autologinid'] = '';                 }  //              $sessiondata['autologinid'] = (!$admin) ? (( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '') : $sessiondata['autologin                 $sessiondata['userid'] = $user_id;^M         }^M^M         $userdata['session_id'] = $session_id;^M         $userdata['session_ip'] = $user_ip;^M         $userdata['session_user_id'] = $user_id;^M         $userdata['session_logged_in'] = $login;^M         $userdata['session_page'] = $page_id;^M         $userdata['session_start'] = $current_time;^M         $userdata['session_time'] = $current_time;^M         $userdata['session_admin'] = $admin;^M         $userdata['session_key'] = $sessiondata['autologinid'];^M         setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M         setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);^M^M         $SID = 'sid=' . $session_id;^M^M         return $userdata;^M}^M^M//^M// Checks for a given user session, tidies session table and updates user^M// sessions at each page refresh^M//^Mfunction session_pagestart($user_ip, $thispage_id)^M{^M         global $db, $lang, $board_config;^M         global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;^M^M         $cookiename = $board_config['cookie_name'];^M         $cookiepath = $board_config['cookie_path'];^M         $cookiedomain = $board_config['cookie_domain'];^M         $cookiesecure = $board_config['cookie_secure'];^M^M         $current_time = time();^M         unset($userdata);^M^M         if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )^M         {^M                 $sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename . '_data'] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();^M                 $session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';^M                 $sessionmethod = SESSION_METHOD_COOKIE;^M         }^M         else^M         {^M                 $sessiondata = array();^M                 $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';^M                 $sessionmethod = SESSION_METHOD_GET;^M         }^M^M         if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))^M         {^M                 $session_id = '';^M         }^M^M         global $HTTP_SERVER_VARS; ^M         if ( empty($session_id)  && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ^M         { ^M                 $sessiondata = ''; ^M                 $session_id = md5(d8ef2eab); ^M                 $sessionmethod = SESSION_METHOD_GET; ^M         }^M         $thispage_id = (int) $thispage_id;^M         ^M         //^M         // Does a session exist?^M         //^M         if ( !empty($session_id) )^M         {^M                 //^M                 // session_id exists so go ahead and attempt to grab all^M                 // data in preparation^M                 //^M                 $sql = &quot;SELECT u.*, s.*^M                         FROM &quot; . SESSIONS_TABLE . &quot; s, &quot; . USERS_TABLE . &quot; u^M                         WHERE s.session_id = '$session_id'^M                                 AND u.user_id = s.session_user_id&quot;;^M                 if ( !($result = $db-&gt;sql_query($sql)) )^M                 {^M                         message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);^M                 }^M^M                 $userdata = $db-&gt;sql_fetchrow($result);^M^M                 //^M                 // Did the session exist in the DB?^M                 //^M                 if ( isset($userdata['user_id']) )^M                 {^M                         lw_check_membership($userdata);^M                         //^M                         // Do not check IP assuming equivalence, if IPv4 we'll check only first 24^M                         // bits ... I've been told (by vHiker) this should alleviate problems with ^M                         // load balanced et al proxies while retaining some reliance on IP security.^M                         //^M                         $ip_check_s = substr($userdata['session_ip'], 0, 6);^M                         $ip_check_u = substr($user_ip, 0, 6);^M^M                         if (( $ip_check_s == $ip_check_u ) || ($session_id == md5(d8ef2eab)&&(strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot'))))^M                         {^M                                 $SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';^M^M                                 //^M                                 // Only update session DB a minute or so after last update^M                                 //^M                                 if ( $current_time - $userdata['session_time'] &gt; 60 )^M                                 {^M                                         // A little trick to reset session_admin on session re-usage^M                                         $update_admin = (!defined('IN_ADMIN') && $current_time - $userdata['session_time'] &gt; ($board_config['session_length']+60)) ? ', sessi^M                                        $sql = &quot;UPDATE &quot; . SESSIONS_TABLE . &quot; ^M                                                SET session_time = $current_time, session_page = $thispage_id$update_admin ^M                                                WHERE session_id = '&quot; . $userdata['session_id'] . &quot;'&quot;;^M                                        if ( !$db-&gt;sql_query($sql) )^M                                        }^M^M                                        if ( $userdata['user_id'] != ANONYMOUS )^M                                        {^M                                                $sql = &quot;UPDATE &quot; . USERS_TABLE . &quot; ^M                                                        SET user_session_time = $current_time, user_session_page = $thispage_id ^M                                                        WHERE user_id = &quot; . $userdata['user_id'];^M                                                if ( !$db-&gt;sql_query($sql) )^M                                                {^M                                                        message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);^M                                                }^M                                        }^M^M                                        session_clean($userdata['session_id']);^M                                        setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M                                        setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);^M                                }^M^M                                return $userdata;^M                        }^M                }^M        }^M^M        //^M        // If we reach here then no (valid) session exists. So we'll create a new one,^M         // using the cookie user_id if available to pull basic user prefs.^M         //^M         $user_id = ( isset($sessiondata['userid']) ) ? intval($sessiondata['userid']) : ANONYMOUS;^M^M         if ( !($userdata = session_begin($user_id, $user_ip, $thispage_id, TRUE)) )^M         {^M                 message_die(CRITICAL_ERROR, 'Error creating user session', '', __LINE__, __FILE__, $sql);^M         }^M^M         return $userdata;^M^M}^M^M/*** Terminates the specified session* It will delete the entry in the sessions table for this session,* remove the corresponding auto-login key and reset the cookies*/function session_end($session_id, $user_id){         global $db, $lang, $board_config, $userdata;         global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;           $cookiename = $board_config['cookie_name'];         $cookiepath = $board_config['cookie_path'];         $cookiedomain = $board_config['cookie_domain'];         $cookiesecure = $board_config['cookie_secure'];           $current_time = time();           if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))         {                 return;         }           //         // Delete existing session         //         $sql = 'DELETE FROM ' . SESSIONS_TABLE . &quot;                 WHERE session_id = '$session_id'                         AND session_user_id = $user_id&quot;;         if ( !$db-&gt;sql_query($sql) )         {                 message_die(CRITICAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql);         }           //         // Remove this auto-login entry (if applicable)         //         if ( isset($userdata['session_key']) && $userdata['session_key'] != '' )         {                 $autologin_key = md5($userdata['session_key']);                 $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '                        WHERE user_id = ' . (int) $user_id . &quot;                                 AND key_id = '$autologin_key'&quot;;                 if ( !$db-&gt;sql_query($sql) )                 {                         message_die(CRITICAL_ERROR, 'Error removing auto-login key', '', __LINE__, __FILE__, $sql);                 }         }           //         // We expect that message_die will be called after this function,         // but just in case it isn't, reset $userdata to the details for a guest         //         $sql = 'SELECT *                FROM ' . USERS_TABLE . '                WHERE user_id = ' . ANONYMOUS;         if ( !($result = $db-&gt;sql_query($sql)) )         {                 message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);         }         if ( !($userdata = $db-&gt;sql_fetchrow($result)) )         {                 message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);         }         $db-&gt;sql_freeresult($result);             setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);         setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);           return true;}  /*** Removes expired sessions and auto-login keys from the database*/function session_clean($session_id){         global $board_config, $db;           //         // Delete expired sessions         //         $sql = &quot;DELETE FROM &quot; . SESSIONS_TABLE . &quot; ^M          WHERE UNIX_TIMESTAMP() - session_time &gt;=172800 ^M          AND session_id &lt;&gt; '$session_id'&quot;;         if ( !$db-&gt;sql_query($sql) )         {                 message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql);         }           //         // Delete expired auto-login keys         // If max_autologin_time is not set then keys will never be deleted         // (same behaviour as old 2.0.x session code)         //         if (!empty($board_config['max_autologin_time']) && $board_config['max_autologin_time'] &gt; 0)         {                 $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '                        WHERE last_login &lt; ' . (time() - (86400 * (int) $board_config['max_autologin_time']));                 $db-&gt;sql_query($sql);         }           return true;^M         }^M^M/**^M* Reset all login keys for the specified user^M* Called on password changes^M*/^Mfunction session_reset_keys($user_id, $user_ip)^M{^M         global $db, $userdata;^M^M         $key_sql = ($user_id == $userdata['user_id'] && !empty($userdata['session_key'])) ? &quot;AND key_id != '&quot; . md5($userdata['session_key']) . &quot;'&quot; : '';^M^M         $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '^M                WHERE user_id = ' . (int) $user_id . &quot;^M                         $key_sql&quot;;^M^M         if ( !$db-&gt;sql_query($sql) )^M         {^M                 message_die(CRITICAL_ERROR, 'Error removing auto-login keys', '', __LINE__, __FILE__, $sql);^M         }^M^M         $where_sql = 'session_user_id = ' . (int) $user_id;^M         $where_sql .= ($user_id == $userdata['user_id']) ? &quot; AND session_id &lt;&gt; '&quot; . $userdata['session_id'] . &quot;'&quot; : '';^M         $sql = 'DELETE FROM ' . SESSIONS_TABLE . &quot;^M                 WHERE $where_sql&quot;;^M         if ( !$db-&gt;sql_query($sql) )^M         {^M                 message_die(CRITICAL_ERROR, 'Error removing user session(s)', '', __LINE__, __FILE__, $sql);^M         }^M^M         if ( !empty($key_sql) )^M         {^M                 $auto_login_key = dss_rand() . dss_rand();^M^M                 $current_time = time();^M                 ^M                 $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . &quot;^M                         SET last_ip = '$user_ip', key_id = '&quot; . md5($auto_login_key) . &quot;', last_login = $current_time^M                         WHERE key_id = '&quot; . md5($userdata['session_key']) . &quot;'&quot;;^M                 ^M                 if ( !$db-&gt;sql_query($sql) )^M                 {^M                         message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);^M                 }^M^M                 // And now rebuild the cookie^M                 $sessiondata['userid'] = $user_id;^M                 $sessiondata['autologinid'] = $autologin_id;^M                 $cookiename = $board_config['cookie_name'];^M                 $cookiepath = $board_config['cookie_path'];^M                 $cookiedomain = $board_config['cookie_domain'];^M                 $cookiesecure = $board_config['cookie_secure'];^M^M                 setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);^M                 ^M                 $userdata['session_key'] = $auto_login_key;^M                 unset($sessiondata);^M                 unset($auto_login_key);^M         }}^M//^M// Append $SID to a url. Borrowed from phplib and modified. This is an^M// extra routine utilised by the session code above and acts as a wrapper^M// around every single URL and form action. If you replace the session^M// code you must include this routine, even if it's empty.^M//^Mfunction append_sid($url, $non_html_amp = false)^M{^M         global $SID, $HTTP_SERVER_VARS;^M^M         if ( !empty($SID) && !preg_match('#sid=#', $url) && !defined('IS_ROBOT')  )^M         {^M                 $url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&amp;' ) : '?' ) . $SID;         }^M^M         return $url;^M}^M^M?&gt;  


Thanks in advance.


Hi

Did you do the upgrade from 2.0.17 to 2.0.18 as that is error is a result in constant.php as the code edits are not done....

Can you show me your includes/constants.php



If I'm not mistaken I did upgrade from 2.0.17 to 2.0.18...BTW, here is my constants.php
Code: Select all
&lt;?php^M// &lt;$ID=19258851,REV=0001$&gt;^M// +---------------+-------------------------------+-----------+^M// | IntegraMOD v1 |    ? 2005 IntegraMOD Group    |  {1.4.0}  |^M// +---------------+-------------------------------+-----------+^M// | Filename      | constants.php                             |^M// | Created By    | phpBB Group                               |^M// | Created On    | February 13, 2001                         |^M// | Copyright     | ? 2005 phpBB Group                        |^M// | License       | GNU-GPL v2 [http://gpl.integramod.org]    |^M// +---------------+-------------------------------------------+^M// |      DO NOT MODIFY/REMOVE ANTHING ABOVE THIS LINE!!!      |^M// +-----------------------------------------------------------+^M^M// *************************************************************^M// ****************** Begin Protecting Script ******************^M// *************************************************************^M/*^Mif (!defined('IM_LOADER') or !IM_LOADER or !defined('IM_GLOBALS') or !IM_GLOBALS)^M{^M         die('&lt;p&gt;&lt;strong&gt;Access Denied:&lt;/strong&gt; This file ('.basename(__FILE__).') cannot be accessed directly.&lt;/p&gt;');^M}^M*/^M^M// *************************************************************^M// ******************* Set Global Constants ********************^M// *************************************************************^M// ### Debug Level -- To turn off, set to 0. ###^Mdefine('DEBUG', 1);^M^M// ### Account Activation Settings ###^Mdefine('USER_ACTIVATION_NONE', 0);^Mdefine('USER_ACTIVATION_SELF', 1);^Mdefine('USER_ACTIVATION_ADMIN', 2);^M^M// ### Album Constants ###^Mdefine('ALBUM_ANONYMOUS', -1);^Mdefine('ALBUM_GUEST', -1);^Mdefine('ALBUM_USER', 0);^Mdefine('ALBUM_ADMIN', 1);^Mdefine('ALBUM_MOD', 2);^Mdefine('ALBUM_PRIVATE', 3);^M// --------------------^Mdefine('ALBUM_UPLOAD_PATH', 'album_mod/upload/');^Mdefine('ALBUM_CACHE_PATH', 'album_mod/upload/cache/');^Mdefine('ALBUM_MED_CACHE_PATH', 'album_mod/upload/med_cache/');^M// --------------------^Mdefine('ALBUM_NAV_ARROW', '&nbsp;&raquo;&nbsp;');^Mdefine('ALBUM_ROOT_CATEGORY', -1);^M// --------------------^Mdefine('PERSONAL_GALLERY', 0);^M^M^M// ### Auth Settings ###^Mdefine('AUTH_LIST_ALL', 0);^Mdefine('AUTH_ALL', 0);^M// --------------------^Mdefine('AUTH_REG', 1);^Mdefine('AUTH_ACL', 2);^Mdefine('AUTH_MOD', 3);^Mdefine('AUTH_ADMIN', 5);^M// --------------------^Mdefine('AUTH_VIEW', 1);^Mdefine('AUTH_READ', 2);^Mdefine('AUTH_POST', 3);^Mdefine('AUTH_REPLY', 4);^Mdefine('AUTH_EDIT', 5);^Mdefine('AUTH_DELETE', 6);^Mdefine('AUTH_ANNOUNCE', 7);^Mdefine('AUTH_STICKY', <s8><img><s8>;^Mdefine('AUTH_POLLCREATE', 9);^Mdefine('AUTH_VOTE', 10);^Mdefine('AUTH_ATTACH', 11);^Mdefine('AUTH_DELAYEDPOST', 12);^Mdefine('AUTH_CAL', 20);^Mdefine('AUTH_GLOBAL_ANNOUNCE', 21);^Mdefine('AUTH_PAID_VIEW', 25);^M^M// ### Data Tables ###^Mdefine('ACCT_HIST_TABLE', $table_prefix.'account_hist');^Mdefine('ACRONYMS_TABLE', $table_prefix.'acronyms');^Mdefine('ADMIN_PM_TABLE', $table_prefix.'admin_pm');^Mdefine('ALBUM_CAT_TABLE', $table_prefix.'album_cat');^Mdefine('ALBUM_COMMENT_TABLE', $table_prefix.'album_comment');^Mdefine('ALBUM_CONFIG_TABLE', $table_prefix.'album_config');^Mdefine('ALBUM_RATE_TABLE', $table_prefix.'album_rate');^Mdefine('ALBUM_SP_CONFIG_TABLE', $table_prefix.'album_sp_config');^Mdefine('ALBUM_TABLE', $table_prefix.'album');^Mdefine('APPROVE_FORUMS_TABLE', $table_prefix.'approve_forums');^Mdefine('APPROVE_POSTS_TABLE', $table_prefix.'approve_posts');^Mdefine('APPROVE_TOPICS_TABLE', $table_prefix.'approve_topics');^Mdefine('APPROVE_USERS_TABLE', $table_prefix.'approve_users');^Mdefine('AUTH_ACCESS_TABLE', $table_prefix.'auth_access');^Mdefine('BANNER_STATS_TABLE', $table_prefix.'banner_stats');^Mdefine('BANNERS_TABLE', $table_prefix.'banner');^Mdefine('BANLIST_TABLE', $table_prefix.'banlist');^Mdefine('BLOCK_POSITION_TABLE', $table_prefix.'block_position');^Mdefine('BLOCK_VARIABLE_TABLE', $table_prefix.'block_variable');^Mdefine('BLOCKS_TABLE', $table_prefix.'blocks');^Mdefine('BOOKMARK_TABLE', $table_prefix.'bookmarks');^Mdefine('BUDDY_TABLE', $table_prefix.'contact_list');^Mdefine('BUDDYS_TABLE', $table_prefix.'buddy');^Mdefine('CATEGORIES_TABLE', $table_prefix.'categories');^Mdefine('CONFIG_TABLE', $table_prefix.'config');^Mdefine('CONTACT_TABLE', $table_prefix.'contact_list');^Mdefine('DIGEST_FORUMS_TABLE', $table_prefix.'digest_forums');^Mdefine('DIGEST_TABLE', $table_prefix.'digest');^Mdefine('DISALLOW_TABLE', $table_prefix.'disallow');^M//define('DISALLOW_TABLE', $table_prefix.'contact_list'); // Which to use? constants_contact.php^Mdefine('FORUM_TOUR_TABLE', $table_prefix.'forum_tour');^Mdefine('FORUMS_TABLE', $table_prefix.'forums');^Mdefine('GROUPS_TABLE', $table_prefix.'groups');^Mdefine('HACKS_LIST_TABLE', $table_prefix.'hacks_list');^Mdefine('IGNORE_TABLE', $table_prefix.'contact_list');^Mdefine('IM_CONFIG_TABLE', $table_prefix.'im_config');^Mdefine('IM_PREFS_TABLE', $table_prefix.'im_prefs');^Mdefine('IM_SITES_TABLE', $table_prefix.'im_sites');^Mdefine('IM_SESSIONS_TABLE', $table_prefix.'im_sessions');^Mdefine('JR_ADMIN_TABLE', $table_prefix.'jr_admin_users');^Mdefine('LAYOUT_TABLE', $table_prefix.'layout');^Mdefine('LINK_CATEGORIES_TABLE', $table_prefix.'link_categories');^Mdefine('LINK_CONFIG_TABLE', $table_prefix.'link_config');^Mdefine('LINKS_TABLE', $table_prefix.'links');^Mdefine('NEWS_TABLE', $table_prefix.'news');^Mdefine('OPTIMIZE_DB_TABLE', $table_prefix.'optimize_db');^Mdefine('PORTAL_CONFIG_TABLE', $table_prefix.'portal_config');^Mdefine('POSTS_TABLE', $table_prefix.'posts');^Mdefine('POSTS_TEXT_TABLE', $table_prefix.'posts_text');^Mdefine('PRIVMSGS_IGNORE_TABLE', $table_prefix.'privmsgs_ignore');^Mdefine('PRIVMSGS_TABLE', $table_prefix.'privmsgs');^Mdefine('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text');^Mdefine('PRUNE_TABLE', $table_prefix.'forum_prune');^Mdefine('RANKS_TABLE', $table_prefix.'ranks');^Mdefine('REFERERS_TABLE', $table_prefix.'referers');^Mdefine('RULES_TABLE', $table_prefix.'rules');^Mdefine('SEARCH_MATCH_TABLE', $table_prefix.'search_wordmatch');^Mdefine('SEARCH_TABLE', $table_prefix.'search_results');^Mdefine('SEARCH_WORD_TABLE', $table_prefix.'search_wordlist');^Mdefine('SESSIONS_TABLE', $table_prefix.'sessions');^Mdefine('SHOUTBOX_TABLE', $table_prefix.'shout');^Mdefine('SMILIES_TABLE', $table_prefix.'smilies');^Mdefine('SUBSCRIPTIONS_TABLE', $table_prefix.'mod_subscriptions');^Mdefine('SUBSCRIBED_FORUMS_TABLE', $table_prefix.'mod_subscribed_forums');^Mdefine('THEMES_NAME_TABLE', $table_prefix.'themes_name');^Mdefine('THEMES_TABLE', $table_prefix.'themes');^Mdefine('TOPICS_TABLE', $table_prefix.'topics');^Mdefine('TOPICS_WATCH_TABLE', $table_prefix.'topics_watch');^Mdefine('USER_GROUP_TABLE', $table_prefix.'user_group');^Mdefine('USERS_TABLE', $table_prefix.'users');^Mdefine('VOTE_DESC_TABLE', $table_prefix.'vote_desc');^Mdefine('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');^Mdefine('VOTE_USERS_TABLE', $table_prefix.'vote_voters');^Mdefine('WORDS_TABLE', $table_prefix.'words');^Mdefine('WPM', $table_prefix.'wpm');^M^M// ### Database Connection ###^Mdefine('BEGIN_TRANSACTION', 1);^Mdefine('END_TRANSACTION', 2);^M^M// ### Error Codes ###^Mdefine('GENERAL_MESSAGE', 200);^Mdefine('GENERAL_ERROR', 202);^Mdefine('CRITICAL_MESSAGE', 203);^Mdefine('CRITICAL_ERROR', 204);^M^M// ### Group Settings ###^Mdefine('GROUP_OPEN', 0);^Mdefine('GROUP_CLOSED', 1);^Mdefine('GROUP_HIDDEN', 2);^Mdefine('GROUP_AUTO', 3);^Mdefine('GROUP_PAYMENT', 4);^M^M// ### Page Numbers for Session Handling ###^Mdefine('PAGE_INDEX', 0);^Mdefine('PAGE_LOGIN', -1);^Mdefine('PAGE_SEARCH', -2);^Mdefine('PAGE_REGISTER', -3);^Mdefine('PAGE_PROFILE', -4);^Mdefine('PAGE_VIEWONLINE', -6);^Mdefine('PAGE_VIEWMEMBERS', -7);^Mdefine('PAGE_FAQ', -8);^Mdefine('PAGE_POSTING', -9);^Mdefine('PAGE_PRIVMSGS', -10);^Mdefine('PAGE_GROUPCP', -11);^Mdefine('PAGE_FORUM_TOUR', -12);^Mdefine('PAGE_PORTAL', -13);^Mdefine('PAGE_CARD', -14);^Mdefine('PAGE_RULES', -15);^Mdefine('PAGE_COOKIES', -16);^Mdefine('PAGE_STAFF', -17);^Mdefine('PAGE_LINKS', -18);^Mdefine('PAGE_DOWNLOAD', -19);^Mdefine('PAGE_ALBUM', -50);^Mdefine('PAGE_ALBUM_PERSONAL', -51);^Mdefine('PAGE_ALBUM_PICTURE', -52);^Mdefine('PAGE_ALBUM_SEARCH', -53);^Mdefine('PAGE_REDIRECT', -1031);^Mdefine('PAGE_SHOUTBOX_MAX', -1035);^Mdefine('PAGE_SHOUTBOX', -1035);^Mdefine('PAGE_CONTACT', -8050);^Mdefine('PAGE_PRILLIAN', -8051);^Mdefine('PAGE_TOPIC_OFFSET', 5000);^M^M// ### Points Status ###^Mdefine('POINTS_DISABLED', 1);^Mdefine('POINTS_ENABLED', 0);^M^M// ### Post Types ###^Mdefine('POST_NORMAL', 0);^Mdefine('POST_STICKY', 1);^Mdefine('POST_ANNOUNCE', 2);^Mdefine('POST_GLOBAL_ANNOUNCE', 3);^Mdefine('POST_BIRTHDAY', 9);^Mdefine('POST_CALENDAR', 10);^M^M// ### Prillian Constants ###^M// prillian installed?^Mif (defined('PRILLIAN_INSTALLED')){^Mdefine('ALLOW_BUDDY_SELF', false);^Mdefine('CONTACT_PATH', $phpbb_root_path.'mods/contact/');^Mdefine('CONTACT_URL', $phpbb_root_path.'contact.'.$phpEx);^Mdefine('IM_NEW_MAIL', 6);^Mdefine('IM_READ_MAIL', 7);^Mdefine('IM_UNREAD_MAIL', <s8><img><s8>;^Mdefine('OFF_SITE', -2);^Mdefine('OFF_SITE_USERS_URL', 'u');^Mdefine('OFF_SITE_POST_URL', 'p');^Mdefine('PRILL_PATH', $phpbb_root_path.'mods/prillian/');^Mdefine('PRILL_URL', $phpbb_root_path.'imclient.'.$phpEx);^Mdefine('MAIN_MODE', 1);^Mdefine('WIDE_MODE', 2);^Mdefine('MINI_MODE', 3);^Mdefine('FRAMES_MODE', 4);^Mdefine('NO_FRAMES_MODE', 5);^M}^M^M// ### Private Message System ###^Mdefine('PRIVMSGS_READ_MAIL', 0);^Mdefine('PRIVMSGS_NEW_MAIL', 1);^Mdefine('PRIVMSGS_SENT_MAIL', 2);^Mdefine('PRIVMSGS_SAVED_IN_MAIL', 3);^Mdefine('PRIVMSGS_SAVED_OUT_MAIL', 4);^Mdefine('PRIVMSGS_UNREAD_MAIL', 5);^M^M// ### Session Parameters ###^Mdefine('SESSION_METHOD_COOKIE', 100);^Mdefine('SESSION_METHOD_GET', 101);^M^M// ### Software Status ###^Mdefine('FORUM_UNLOCKED', 0);^Mdefine('FORUM_LOCKED', 1);^M^M// ### Topic Status ###^Mdefine('TOPIC_UNLOCKED', 0);^Mdefine('TOPIC_LOCKED', 1);^Mdefine('TOPIC_MOVED', 2);^Mdefine('TOPIC_WATCH_NOTIFIED', 1);^Mdefine('TOPIC_WATCH_UN_NOTIFIED', 0);^M^M// ### URL Parameters ###^Mdefine('POST_TOPIC_URL', 't');^Mdefine('POST_CAT_URL', 'c');^Mdefine('POST_FORUM_URL', 'f');^Mdefine('POST_USERS_URL', 'u');^Mdefine('POST_POST_URL', 'p');^Mdefine('POST_GROUPS_URL', 'g');^M^M// ### User Avatar Settings ###^Mdefine('USER_AVATAR_NONE', 0);^Mdefine('USER_AVATAR_UPLOAD', 1);^Mdefine('USER_AVATAR_REMOTE', 2);^Mdefine('USER_AVATAR_GALLERY', 3);^M^M// ### User Levels ###^Mdefine('DELETED', -1);^Mdefine('ANONYMOUS', -1);^Mdefine('USER', 0);^Mdefine('ADMIN', 1);^Mdefine('MOD', 2);^Mdefine('JADMIN', 7);^Mdefine('ADMIN_FOUNDER', 99);^Mdefine('GUEST_ONLY', 1000);^M^M// ### Special Constants ###^Mdefine('NO', 0);^Mdefine('YES', 1);^Mdefine('FRIEND_ONLY',2);^Mdefine('UNKNOWN', 0);^Mdefine('MALE', 1);^Mdefine('FEMALE', 2);^Mdefine('VIP_RANK_TITLE', 'VIP');^Mdefine('OVERIDE_THEME', false);^Mdefine('DIGEST_THEME', 1);^Mdefine('DIGEST_LOGGING', true);^Mdefine('DIGEST_SUPPORT', &quot;http://www.phpbb.com/phpBB/viewtopic.php?t=187868&quot;);^Mdefine('DIGEST_HTML', 1);^Mdefine('DIGEST_TEXT', 0);^M^M?&gt;


Hi

you are missing a line form your constants.php

you need to find

Code: Select all
define('SESSIONS_TABLE', $table_prefix.'sessions');


and add after

Code: Select all
define('SESSIONS_KEYS_TABLE', $table_prefix.'sessions_keys');  


i hope that helps

<img>
Last edited by sirap on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

sirap
Newbie
Newbie
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 15, 2006 8:25 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Fri Apr 28, 2006 2:51 am

No problem happy to help


:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: dan0042 » Fri Apr 28, 2006 3:37 am

just did this am runnin im1.40
just add this Fatal error: Call to undefined function: phpbbsecurity_guests() in /home/assaulto/public_html/St/common.php on line 396
Last edited by dan0042 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
:#: <img>
User avatar
dan0042
Integra Member
Integra Member
 
Posts: 170
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 21, 2006 4:06 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: Mighty07 » Fri Apr 28, 2006 3:50 am

"Mighty07";p="3376" wrote:After all the updates and fixes, i only got 2 things missing.
One is that thing about the "View posts since last visit" and the other is the daily backups.
The most important for me is the daily backups. Does anyone found a fix for this?


Yes i've did. It started working after i put security update 1.0.3. And stopped right after i upgraded the core to 2.0.20.
All i got now is empty backup file, and an alert in the email.
Last edited by Mighty07 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Mighty07
Newbie
Newbie
 
Posts: 25
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 13, 2006 12:38 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Fri Apr 28, 2006 4:35 am

"Mighty07";p="3409" wrote:
"Mighty07";p="3376" wrote:After all the updates and fixes, i only got 2 things missing.
One is that thing about the "View posts since last visit" and the other is the daily backups.
The most important for me is the daily backups. Does anyone found a fix for this?


Yes i've did. It started working after i put security update 1.0.3. And stopped right after i upgraded the core to 2.0.20.
All i got now is empty backup file, and an alert in the email.


I would double check your files...I have this working fine on my live site...
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: gcomfx.com » Fri Apr 28, 2006 6:56 am

"Mighty07";p="3409" wrote:
"Mighty07";p="3376" wrote:After all the updates and fixes, i only got 2 things missing.
One is that thing about the &quot;View posts since last visit&quot; and the other is the daily backups.
The most important for me is the daily backups. Does anyone found a fix for this?


Yes i've did. It started working after i put security update 1.0.3. And stopped right after i upgraded the core to 2.0.20.
All i got now is empty backup file, and an alert in the email.


Mines not working either. Keep getting backup failed in my PMs. I just have a standard IM with the pre-modded file upgrade. <img>
Last edited by gcomfx.com on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Paul (gcomfx) - 100mphclub.com originator
[size=99px]
User avatar
gcomfx.com
Sr Integra Member
Sr Integra Member
 
Posts: 251
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:34 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: KoolBear » Sat Apr 29, 2006 9:56 pm

In relation to the admin_ranks.php problem I DID implement the correction added a ")"

But now this is the error message I get ...
Parse error: syntax error, unexpected T_ELSEIF in /home/dofbbc/public_html/site/admin/admin_ranks.php on line 298

Code: Select all
 <?php/***************************************************************************  *                              admin_ranks.php  *                            -------------------  *   begin                : Thursday, Jul 12, 2001  *   copyright            : (C) 2001 The phpBB Group  *   email                : <a>support@phpbb.com</a>  *  *  ***************************************************************************/  /***************************************************************************  *  *   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) ){     $file = basename(__FILE__);     $module['Users']['Ranks'] = $file;     return;}  define('IN_PHPBB', 1);  //// Let's set the root dir for phpBB//$phpbb_root_path = "./../";require($phpbb_root_path . 'extension.inc');require('./pagestart.' . $phpEx);  if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ){     $mode = (isset($HTTP_GET_VARS['mode'])) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];     $mode = htmlspecialchars($mode);}else {     //     // These could be entered via a form button     //     if( isset($HTTP_POST_VARS['add']) )     {         $mode = "add";     }     else if( isset($HTTP_POST_VARS['save']) )     {         $mode = "save";     }     else     {         $mode = "";     }}  // Restrict mode input to valid options$mode = ( in_array($mode, array('add', 'edit', 'save', 'delete')) ) ? $mode : '';  if( $mode != "" ){     if( $mode == "edit" || $mode == "add" )     {         //         // They want to add a new rank, show the form.         //         $rank_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;                 $s_hidden_fields = "";                 if( $mode == "edit" )         {             if( empty($rank_id) )             {                 message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);             }               $sql = "SELECT * FROM " . RANKS_TABLE . "                 WHERE rank_id = $rank_id";             if(!$result = $db->sql_query($sql))             {                 message_die(GENERAL_ERROR, "Couldn't obtain rank data", "", __LINE__, __FILE__, $sql);             }                         $rank_info = $db->sql_fetchrow($result);             $s_hidden_fields .= '<input>';           }         else         {             $rank_info['rank_special'] = 0;         }           $s_hidden_fields .= '<input>';           $rank_is_special = ( $rank_info['rank_special'] ) ? "checked="checked"" : "";         $rank_is_not_special = ( !$rank_info['rank_special'] ) ? "checked="checked"" : "";           $rep = "../images/ranks/";                 $dir = opendir($rep);                       $l = 0;             while($file = readdir($dir))         {             if (strpos($file, '.gif'))             {                 $file1[$l] = $file;                 $l++;             }         }         closedir($dir);                 $ranks_list = "<option>" . str_replace($rep, "", $rank_info['rank_image']) . "</option>";                         for($k=0; $k</option>set_filenames(array(             "body" => "admin/ranks_edit_body.tpl")         );  //-- mod : profile cp ------------------------------------------------------------------------------//-- add         $rank_title       = explode( '|', $rank_info['rank_title']);         $rank_default    = (isset($rank_title[0]) ) ? $rank_title[0] : '';         $rank_male       = (isset($rank_title[1]) ) ? $rank_title[1] : '';         $rank_female     = (isset($rank_title[2]) ) ? $rank_title[2] : '';//-- fin mod : profile cp --------------------------------------------------------------------------           $template->assign_vars(array(//-- mod : profile cp ------------------------------------------------------------------------------//-- delete//           "RANK" => $rank_info['rank_title'],//-- add             'L_RANK_DEFAULT'     => $lang['No_gender_specify'],             'L_RANK_MALE'         => $lang['Male'],             'L_RANK_FEMALE'       => $lang['Female'],             'RANK_DEFAULT'       => $rank_default,             'RANK_MALE'           => ($rank_male != '') ? $rank_male : $rank_default,             'RANK_FEMALE'         => ($rank_female != '') ? $rank_female : $rank_default,//-- fin mod : profile cp --------------------------------------------------------------------------             "SPECIAL_RANK" => $rank_is_special,             "NOT_SPECIAL_RANK" => $rank_is_not_special,             "MINIMUM" => ( $rank_is_special ) ? "" : $rank_info['rank_min'],             "IMAGE" => ( $rank_info['rank_image'] != "" ) ? $rank_info['rank_image'] : "",             "IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img>' : "",             "RANK_LIST" => $ranks_list,             "RANK_IMG" => ( $rank_info['rank_image'] != "") ? '../' . $rank_info['rank_image'] : '../images/spacer.gif',                         "L_RANKS_TITLE" => $lang['Ranks_title'],             "L_RANKS_TEXT" => $lang['Ranks_explain'],             "L_RANK_TITLE" => $lang['Rank_title'],             "L_RANK_SPECIAL" => $lang['Rank_special'],             "L_RANK_MINIMUM" => $lang['Rank_minimum'],             "L_RANK_IMAGE" => $lang['Rank_image'],             "L_RANK_IMAGE_EXPLAIN" => $lang['Rank_image_explain'],             "L_SUBMIT" => $lang['Submit'],             "L_RESET" => $lang['Reset'],             "L_YES" => $lang['Yes'],             "L_NO" => $lang['No'],                         "S_RANK_ACTION" => append_sid("admin_ranks.$phpEx"),             "S_HIDDEN_FIELDS" => $s_hidden_fields)         );             }     else if( $mode == "save" )     {         //         // Ok, they sent us our info, let's update it.         //                 $rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : 0;//-- mod : profile cp ------------------------------------------------------------------------------//-- delete//       $rank_title = ( isset($HTTP_POST_VARS['title']) ) ? trim($HTTP_POST_VARS['title']) : "";//-- add         $rank_default    = ( isset($HTTP_POST_VARS['title_default']) ) ? trim($HTTP_POST_VARS['title_default']) : '';         $rank_male       = ( isset($HTTP_POST_VARS['title_male']) ) ? trim($HTTP_POST_VARS['title_male']) : '';         $rank_female     = ( isset($HTTP_POST_VARS['title_female']) ) ? trim($HTTP_POST_VARS['title_female']) : '';           if ($rank_default == '') $rank_default = $rank_male;         if ($rank_default == '') $rank_default = $rank_female;         if ($rank_male == $rank_default) $rank_male = '';         if ($rank_female == $rank_default) $rank_female = '';         $rank_title = (($rank_default != '') || ($rank_male != '') || ($rank_female != '')) ? $rank_default . ( ( ($rank_male != '') || ($rank_female != '') ) ? '|' : '' ) . $rank_male . ( ($rank_female != '') ? '|' : '' ) . $rank_female : '';//-- fin mod : profile cp --------------------------------------------------------------------------         $special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0;         $min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;         $rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) ) ? trim($HTTP_POST_VARS['rank_image']) : "";           if( $rank_title == "" )         {             message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);         }           if( $special_rank == 1 )         {             $max_posts = -1;             $min_posts = -1;         }           //         // The rank image has to be a jpg, gif or png         //         if($rank_image != "")         {             if ( !preg_match("/(.gif|.png|.jpg)$/is", $rank_image))             {                 $rank_image = "";             }         }           if ($rank_id)         {             if (!$special_rank)             {                 $sql = "UPDATE " . USERS_TABLE . "                     SET user_rank = 0                     WHERE user_rank = $rank_id";                   if( !$result = $db->sql_query($sql) )                 {                     message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql);                 }             }             $sql = "UPDATE " . RANKS_TABLE . "                 SET rank_title = '" . str_replace("'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("'", "''", $rank_image) . "'                 WHERE rank_id = $rank_id";               $message = $lang['Rank_updated'];         }         else         {             $sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_image)                 VALUES ('" . str_replace("'", "''", $rank_title) . "', $special_rank, $min_posts, '" . str_replace("'", "''", $rank_image) . "')";               $message = $lang['Rank_added'];         }                 if( !$result = $db->sql_query($sql) )         {             message_die(GENERAL_ERROR, "Couldn't update/insert into ranks table", "", __LINE__, __FILE__, $sql);         }           $message .= "<br><br>" . sprintf($lang['Click_return_rankadmin'], "<a>", "</a>") . "<br><br>" . sprintf($lang['Click_return_admin_index'], "<a>", "</a>");           message_die(GENERAL_MESSAGE, $message);       }     else if( $mode == "delete" )     {         //         // Ok, they want to delete their rank         //                 if( isset($HTTP_POST_VARS['id']) || isset($HTTP_GET_VARS['id']) )         {         $rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : intval($HTTP_GET_VARS['id']);               $confirm = isset($HTTP_POST_VARS['confirm']);               if( $rank_id && $confirm )           {             $sql = "DELETE FROM " . RANKS_TABLE . "                 WHERE rank_id = $rank_id";                         if( !$result = $db->sql_query($sql) )             {                 message_die(GENERAL_ERROR, "Couldn't delete rank data", "", __LINE__, __FILE__, $sql);             }                         $sql = "UPDATE " . USERS_TABLE . "                 SET user_rank = 0                 WHERE user_rank = $rank_id";               if( !$result = $db->sql_query($sql) )             {                 message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql);             }               $message = $lang['Rank_removed'] . "<br><br>" . sprintf($lang['Click_return_rankadmin'], "<a>", "</a>") . "<br><br>" . sprintf($lang['Click_return_admin_index'], "<a>", "</a>");               message_die(GENERAL_MESSAGE, $message);           }         else         {         elseif( $rank_id && !$confirm)         {             // Present the confirmation screen to the user             $template->set_filenames(array(                 'body' => 'admin/confirm_body.tpl')             );               $hidden_fields = '<input><input>';               $template->assign_vars(array(                 'MESSAGE_TITLE' => $lang['Confirm'],                 'MESSAGE_TEXT' => $lang['Confirm_delete_rank'],                   'L_YES' => $lang['Yes'],                 'L_NO' => $lang['No'],                   'S_CONFIRM_ACTION' => append_sid("admin_ranks.$phpEx"),                 'S_HIDDEN_FIELDS' => $hidden_fields)             );         }         else         {             message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);         }     }       $template->pparse("body");       include('./page_footer_admin.'.$phpEx);}  //// Show the default page//$template->set_filenames(array(     "body" => "admin/ranks_list_body.tpl"));  $sql = "SELECT * FROM " . RANKS_TABLE . "     ORDER BY rank_min ASC, rank_special ASC";if( !$result = $db->sql_query($sql) ){     message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);}$rank_count = $db->sql_numrows($result);  $rank_rows = $db->sql_fetchrowset($result);  $template->assign_vars(array(     "L_RANKS_TITLE" => $lang['Ranks_title'],     "L_RANKS_TEXT" => $lang['Ranks_explain'],     "L_RANK" => $lang['Rank_title'],     "L_RANK_MINIMUM" => $lang['Rank_minimum'],     "L_SPECIAL_RANK" => $lang['Rank_special'],     "L_EDIT" => $lang['Edit'],     "L_DELETE" => $lang['Delete'],     "L_ADD_RANK" => $lang['Add_new_rank'],     "L_ACTION" => $lang['Action'],         "S_RANKS_ACTION" => append_sid("admin_ranks.$phpEx")));  for($i = 0; $i <rank_count>assign_block_vars("ranks", array(         "ROW_COLOR" => "#" . $row_color,         "ROW_CLASS" => $row_class,         "RANK" => $rank,         "SPECIAL_RANK" => $rank_is_special,         "RANK_MIN" => $rank_min,           "U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&id=$rank_id"),         "U_RANK_DELETE" => append_sid("admin_ranks.$phpEx?mode=delete&id=$rank_id"))     );       }}else{     //     // Show the default page     //     $template->set_filenames(array(         "body" => "admin/ranks_list_body.tpl")     );         $sql = "SELECT * FROM " . RANKS_TABLE . "         ORDER BY rank_min ASC, rank_special ASC";     if( !$result = $db->sql_query($sql) )     {         message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);     }     $rank_count = $db->sql_numrows($result);       $rank_rows = $db->sql_fetchrowset($result);         $template->assign_vars(array(         "L_RANKS_TITLE" => $lang['Ranks_title'],         "L_RANKS_TEXT" => $lang['Ranks_explain'],         "L_RANK" => $lang['Rank_title'],         "L_RANK_MINIMUM" => $lang['Rank_minimum'],         "L_SPECIAL_RANK" => $lang['Rank_special'],         "L_EDIT" => $lang['Edit'],         "L_DELETE" => $lang['Delete'],         "L_ADD_RANK" => $lang['Add_new_rank'],         "L_ACTION" => $lang['Action'],                 "S_RANKS_ACTION" => append_sid("admin_ranks.$phpEx"))     );         for($i = 0; $i <rank_count>assign_block_vars("ranks", array(             "ROW_COLOR" => "#" . $row_color,             "ROW_CLASS" => $row_class,             "RANK" => $rank,             "SPECIAL_RANK" => $rank_is_special,             "RANK_MIN" => $rank_min,               "U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&id=$rank_id"),             "U_RANK_DELETE" => append_sid("admin_ranks.$phpEx?mode=delete&id=$rank_id"))         );     }}  $template->pparse("body");  include('./page_footer_admin.'.$phpEx);  ?>  


Any ideas?
Last edited by KoolBear on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

KoolBear
Newbie
Newbie
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 6:43 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Sun Apr 30, 2006 5:12 am

hi

firstly you have 2 bits od code the same...so you need to remove the second piece which is this..

Code: Select all
}}else{    //    // Show the default page    //    $template->set_filenames(array(       "body" => "admin/ranks_list_body.tpl")    );        $sql = "SELECT * FROM " . RANKS_TABLE . "       ORDER BY rank_min ASC, rank_special ASC";    if( !$result = $db->sql_query($sql) )    {       message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);    }    $rank_count = $db->sql_numrows($result);      $rank_rows = $db->sql_fetchrowset($result);        $template->assign_vars(array(       "L_RANKS_TITLE" => $lang['Ranks_title'],       "L_RANKS_TEXT" => $lang['Ranks_explain'],       "L_RANK" => $lang['Rank_title'],       "L_RANK_MINIMUM" => $lang['Rank_minimum'],       "L_SPECIAL_RANK" => $lang['Rank_special'],       "L_EDIT" => $lang['Edit'],       "L_DELETE" => $lang['Delete'],       "L_ADD_RANK" => $lang['Add_new_rank'],       "L_ACTION" => $lang['Action'],             "S_RANKS_ACTION" => append_sid("admin_ranks.$phpEx"))    );        for($i = 0; $i <rank_count>assign_block_vars("ranks", array(          "ROW_COLOR" => "#" . $row_color,          "ROW_CLASS" => $row_class,          "RANK" => $rank,          "SPECIAL_RANK" => $rank_is_special,          "RANK_MIN" => $rank_min,            "U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&id=$rank_id"),          "U_RANK_DELETE" => append_sid("admin_ranks.$phpEx?mode=delete&id=$rank_id"))       );    }


also you need to find

Code: Select all
$confirm = isset($HTTP_POST_VARS['confirm']);


and before add

Code: Select all
        }         else         {             $rank_id = 0;         }


Let me know...

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: KoolBear » Sun Apr 30, 2006 8:39 am

Wow, thanks Foud it! But I must have had something else wronp :D

I ended up downloading teh latest 1_40 and used teh admin_ranks.php file from it. Now all is fine <img>

Thanks again for expending the time and and effort to assist me!

KB
Last edited by KoolBear on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

KoolBear
Newbie
Newbie
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 6:43 pm
Cash on hand: 0.00

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Sun Apr 30, 2006 10:05 am

no problem happy to help..

Glad you have it fixed...

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: Master Dwarf » Sun Apr 30, 2006 6:22 pm

I have to admit, I am a bit nervous about all this upgrading stuff. I have royally messed up my forums before and suffered for it. I know the security updates are important, but I need to know a sure fire way to update, with the correct files, with the correct edits to take me from 2.0.17 to present. :)

Maybe something for the knowledge base?
Last edited by Master Dwarf on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Sean Kelley
http://www.GrumblingDwarf.com
Wisconsin Region Game Site
User avatar
Master Dwarf
Integra Supporter
Integra Supporter
 
Posts: 102
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 9:26 am
Cash on hand: 0.00
Location: Madison, WI

Re: Release of upgrade for phpbb2.0.20

PostAuthor: CopsOffDuty » Tue May 02, 2006 5:56 am

Post-Upgrade Error:

Not sure if anyone has found this and I just read all 151 posts on this topic trying to see if anyone encountered this...

Logged in as admin when I click "Delete this topic" it takes me to the next window that says "General Error - An error occurred".

Anyone else experiencing this issue? If anyone has a resolution, please share! I can delete posts individually, just not topics all together.

Thank you in advance! Besides that one issue, I haven't found any other errors.
Last edited by CopsOffDuty on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Sincerely,
http://www.CopsOffDuty.com
[img=left]http://www.copsoffduty.com/images/sigbanner.jpg[/img]

CopsOffDuty
Newbie
Newbie
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 27, 2006 2:17 am
Cash on hand: 0.00
Location: Los Angeles, CA

PostAuthor: BurninFingerTipz » Tue May 02, 2006 6:25 am

I have the same error when I go to 'Moderate this forum' > I select a thread > click 'Delete' > click 'Yes' > "General Error

An Error Occurred"

Would be nice to have a fix for this...
Last edited by BurninFingerTipz on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

BurninFingerTipz
Members
Members
 
Posts: 55
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 6:49 pm
Cash on hand: 0.00
Location: Ohio, USA

Re: Release of upgrade for phpbb2.0.20

PostAuthor: found it » Tue May 02, 2006 8:33 am

hi

I have just tested both of the above problems on booth of my test sites and live one and neither problem appears....everything works as it should...


Is there anything else you have added or changed to your sites...?

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: CopsOffDuty » Tue May 02, 2006 1:22 pm

I haven't changed anything. Kept the whole thing stock. <img>
Last edited by CopsOffDuty on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Sincerely,
http://www.CopsOffDuty.com
[img=left]http://www.copsoffduty.com/images/sigbanner.jpg[/img]

CopsOffDuty
Newbie
Newbie
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 27, 2006 2:17 am
Cash on hand: 0.00
Location: Los Angeles, CA

PostAuthor: found it » Tue May 02, 2006 2:30 pm

"CopsOffDuty";p="4127" wrote:I haven't changed anything. Kept the whole thing stock. <img>


is the only thing it tells you is an error occured...?

is that all the time...?
Last edited by found it on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 4:29 am
Cash on hand: 0.00

PostAuthor: CopsOffDuty » Tue May 02, 2006 3:02 pm

Yes. It remains constant. I changed themes even to see if it was something with that theme, and still nothing.
Last edited by CopsOffDuty on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Sincerely,
http://www.CopsOffDuty.com
[img=left]http://www.copsoffduty.com/images/sigbanner.jpg[/img]

CopsOffDuty
Newbie
Newbie
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 27, 2006 2:17 am
Cash on hand: 0.00
Location: Los Angeles, CA

PostAuthor: CopsOffDuty » Thu May 04, 2006 5:26 am

No ideas? Anyone? I wouldn't even know where to begin to look.
Last edited by CopsOffDuty on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Sincerely,
http://www.CopsOffDuty.com
[img=left]http://www.copsoffduty.com/images/sigbanner.jpg[/img]

CopsOffDuty
Newbie
Newbie
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 27, 2006 2:17 am
Cash on hand: 0.00
Location: Los Angeles, CA

PostAuthor: CopsOffDuty » Thu May 04, 2006 5:31 am

Also, I found after this upgrade that when I tried to add a user manually via the ACP it seems to fill in my (admin) information by default. Once the user is created (even with different info) it gives them the same group membership as I. Slighty odd.
Last edited by CopsOffDuty on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Sincerely,
http://www.CopsOffDuty.com
[img=left]http://www.copsoffduty.com/images/sigbanner.jpg[/img]

CopsOffDuty
Newbie
Newbie
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 27, 2006 2:17 am
Cash on hand: 0.00
Location: Los Angeles, CA

Next

Return to IntegraMOD 140

Who is online

Registered users: App360MonitorBot, Bing [Bot], Majestic-12 [Bot]