PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
NoFantasy
Worker
Worker


Joined: Apr 26, 2005
Posts: 114

PostPosted: Wed Nov 15, 2006 7:17 am Reply with quote Back to top

Just in the middle of upgrading from 3.1 to 3.3 patched i discovered some really odd stuff happening with the Web_Links module. I'm done patching all core files and the BBtoNuke, so basically the site now runs on patched3.3 and BBtoNuke.21, just some modules still remains to be upgraded.

The problem seems to be this particular code found four places in the WebLinks index-file:
Code:
if ($row2a['radminsuper'] == 1 || $auth_user == 1) {
echo "<a href=\"".$admin_file.".php?op=LinksModLink&amp;lid=$lid\">"._EDIT."</a> | ";
}

If i don't comment out the second line, the edit link will show to all users. What did i miss? Is it a bug or me forgot something during patching?

It looks like the code doesn't work at all...
View user's profile Send private message
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2749

PostPosted: Wed Nov 15, 2006 8:04 am Reply with quote Back to top

It looks like a typo.. but it isn't.
It's reading from the admin query here
Code:

$row2a = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".$prefix."_authors WHERE aid='$aid'"));


That looks correct


Last edited by evaders99 on Wed Nov 15, 2006 8:20 am; edited 1 time in total
View user's profile Send private message Visit poster's website
NoFantasy
Worker
Worker


Joined: Apr 26, 2005
Posts: 114

PostPosted: Wed Nov 15, 2006 8:18 am Reply with quote Back to top

...seems like using $row2a is the one...
Code:
$admin = base64_decode($admin);
   $admin = addslashes($admin);
   $admin = explode(":", $admin);
    $aid = "$admin[0]";
    $row = $db->sql_fetchrow($db->sql_query("SELECT title, admins FROM ".$prefix."_modules WHERE title='Web_Links'"));
    $row2a = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".$prefix."_authors WHERE aid='$aid'"));
    $admins = explode(",", $row['admins']);
    $auth_user = 0;
    for ($i=0; $i < sizeof($admins); $i++) {
        if ($row2a['name'] == "$admins[$i]" AND !empty($row['admins'])) {
            $auth_user = 1;   
        }

This code is from the function viewlink in the 3.3patched index file
View user's profile Send private message
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2749

PostPosted: Wed Nov 15, 2006 8:20 am Reply with quote Back to top

Sorry I looked at the code again and edited my post. It seems correct
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum