You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 75 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - How can I verify the admin from a different database? [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Richard-nukecops
Nuke Cadet
Nuke Cadet


Joined: Feb 13, 2003
Posts: 7

Location: USA

PostPosted: Thu Feb 13, 2003 10:04 am Reply with quoteBack to top

Rolling Eyes I used to apply the following code and it worked very well. But since I upgraded to phpnuke 6.0 this is no longer possible, instead the script is searching for the admin data in a wrong database.

Any help?

--
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/username/public_html/com/includes/sql_layer.php on line 306
Table 'username_anotherdb.nuke_authors' doesn't existSelection from database failed!
--

The code I am using:

Quote:

$youareadmin = 0;
global $prefix, $dbi, $admin;
if (is_admin($admin)) {
$youareadmin = 1;
}

include("auth.php");
getusrinfo($user);
$uname = $cookie[1];


if ($registered)
{
$result=sql_query("select name, email from ".$user_prefix."_users where uname='$cookie[1]'", $dbi);
list($your_name, $your_email) = sql_fetch_row($result, $dbi);
}



Thanks
Find all posts by Richard-nukecopsView user's profileSend private message
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Thu Feb 13, 2003 10:07 am Reply with quoteBack to top

Try changing "$user_prefix" to just "$prefix"

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
Richard-nukecops
Nuke Cadet
Nuke Cadet


Joined: Feb 13, 2003
Posts: 7

Location: USA

PostPosted: Sat Feb 15, 2003 1:20 am Reply with quoteBack to top

Thanks, but I am sorry it did not help.

Richard
Find all posts by Richard-nukecopsView user's profileSend private message
Richard-nukecops
Nuke Cadet
Nuke Cadet


Joined: Feb 13, 2003
Posts: 7

Location: USA

PostPosted: Sat Feb 15, 2003 9:16 am Reply with quoteBack to top

I think the global definitions we are required.

It functions this way: Very Happy

Quote:

global $user, $userinfo, $cookie, $user_prefix, $prefix, $dbi, $admin;
include("auth.php");
if (is_user($user)){
getusrinfo($user);
$uname = $userinfo[uname];
$email = $userinfo[femail];
$url = $userinfo[url];
$score = 1;
$registered = 1;
$result=sql_query("select name, email from ".$user_prefix."_users where uname='$cookie[1]'", $dbi);
list($your_name, $your_email) = sql_fetch_row($result, $dbi);
} else {
$registered = 0;
$name = ""; $email = ""; $url = "";
$score = 0;
}


Find all posts by Richard-nukecopsView user's profileSend private message
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Sat Feb 15, 2003 3:13 pm Reply with quoteBack to top

And that is exactly the code you have that doesn't work?

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.259 Seconds - 219 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::