PDA

View Full Version : Little broken page permissions hack...


Bill Vandele
11-09-2005, 11:34 PM
Hello,

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


<?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
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/showthread.php?t=98009&highlight=permissions+page

And it looked like this should work...