vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Little broken page permissions hack... (https://vborg.vbsupport.ru/showthread.php?t=100500)

Bill Vandele 11-09-2005 11:34 PM

Little broken page permissions hack...
 
Hello,

I had this little code into a permissions.php page of my site,

Quote:

<?php

chdir('C:\Inetpub\wwwroot\forums');
require_once('./global.php');

if ($bbuserinfo['usergroupid']!=5 and $bbuserinfo['usergroupid']!=6 and $bbuserinfo['usergroupid']!=7 and $bbuserinfo['usergroupid']!=9 and $bbuserinfo['usergroupid']!=13)
{
//echo "<br /><div style=\"color:#cc0000;\"><strong>You are not allowed in!</strong></div><br />";
header("Location:(redirection url)");
exit;
}
else
{
echo "<br /><div style=\"color:#00cc00;\"><strong>You are an Association Member</strong></div><br />";
}


?>
And when I recently upgraded to 3.51, it broke, and doesn't work. Now it just goes to the redirection url. Can anyone tell me why that would be?

I have no idea.

noppid 11-09-2005 11:39 PM

$bbuserinfo['usergroupid'] and so forth are now $vbulletin->userinfo['usergroupid']

Boofo 11-10-2005 02:31 AM

And chdir is different now, too, I think, as well as the require_once path.

Bill Vandele 11-10-2005 11:14 PM

Quote:

Originally Posted by Boofo
And chdir is different now, too, I think, as well as the require_once path.

Thank you. I changed the first post's suggestion and, while it still doesn't work, I get a different result (just blank page).

Boofo, any chance you could let me know what the require_once path is, and the chdir?

Thanks,

I had looked here,

https://vborg.vbsupport.ru/showthrea...rmissions+page

And it looked like this should work...


All times are GMT. The time now is 08:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02255 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete