Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes
Author Message
hireamerica
Client


Joined: Sep 30, 2004
Posts: 103
Location: New Jersey

PostPosted: Mon Aug 01, 2005 1:06 pm Reply with quote

If I leave the main page, I lose Admin privs, other than going to Admin page.

This is of course really annoying as I'm trying to test inactive modules or modules for admin only.

In block-modules.php I do:

Code:
global $prefix, $db, $admin


So that let's that menu become Admin friendly, which works fine.

so, I think $admin is getting nulled when I move to another screen using a java_s_cript command.

I have simple code which changes URL when a drop-down is chosen on my site.

Can someone take a look at Only registered users can see links on this board! Get registered or login! and see what I mean, but also then comment on if somehow this might be killing $admin (maybe if your own site uses drop downs to navigate, you did something special I'm not doing?)
 
View user's profile Send private message Visit poster's website Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Mon Aug 01, 2005 5:08 pm Reply with quote

This isn't really much to go on, but for each place you jump to, you have to not only use a global $admin, but you have to do a check also, as in if (is_admin($admin)) ...;. I don't know if that helps or not. Does that reply completely miss your point? This also could be a cookie issue.
 
View user's profile Send private message
hireamerica
PostPosted: Mon Aug 01, 2005 5:16 pm Reply with quote

Well, the consideration is that most places I go to are normal (untouched) modules. Your Account, Stats, Content, Downloads, etc.

Wouldn't it be fair to assume that those modules would "de-admin" an admin?

Cookies? I did the client thing (local hosts) and I'm just wondering if it's the java_s_cript I'm using:

Code:
function menu_goto( menuform )

{
    var baseurl = "http://www.hireamerica.us" ;
    selecteditem = menuform.newurl.selectedIndex ;
    newurl = menuform.newurl.options[ selecteditem ].value ;
    if (newurl.length != 0) {
      location.href = baseurl + newurl ;
    }
}


I action this in my menus using a <select> that has an "onchange" referencing this.

I just checked also...if I go back to not using a drop-down select and keep them as individual hrefs, then I don't lose admin.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©