Log in

View Full Version : whois online question


Ruth
08-29-2001, 07:14 PM
if i want to hack whois online to show members in non-vB pages, but all my other non-vB pages are named index.php

how does the script differentiate between the pages?

thanks

Wayne Luke
08-30-2001, 12:55 PM
You would have to add code so that it can based upon the directory the file is in.

Admin
08-30-2001, 01:06 PM
I think that adding this line
$folder = substr($filename, 0, $pos);
right above this line
$filename = substr($filename, $pos+1);
Should give you the full path (only folders) to the file.
Then you can use $folder for some if statements inside this:
case 'index.php':
$userinfo[activity] = 'index';
break;
i.e:
case 'index.php':
if (strstr ($folder, "math")) {
$userinfo[activity] = 'math';
} elseif (strstr ($folder, "english")) {
$userinfo[activity] = 'english';
} else {
$userinfo[activity] = 'index';
}
break;
I think that will work.

Ruth
09-02-2001, 03:09 PM
thanks FireFly, i'll give that a try :)

cheers,