From PHP coding perspective, I can't
But from a logical perspective ... I can.
Say that its a given ... that part of your IP address never changes.
[your IP Address]
24.48.xxx.xxx
Store (hard code) that value into a variable: $admin1_ip = 2448
(The Admin_ip is stored into the php code so that it's out of view from the admin CP, and undetected.)
Now you can use these numbers to match the first part of the logged in user's IP address.
Now Capture the IP address of the logged in user:
[logged in user]
198.56.xxx.xxx
Remove everything after the second dot (198.56) and Strip the dots from the IP address (19856).
$temp = $bbuserinfo[ipaddress] (current logged in admin);
$admin2_ip = $temp
$admin_ip2 = 19856
if (userid=1 AND ($Admin2_ip == $Admin1_ip)){
If there's a match, and the other conditions are true,
--- > DO action.
else
----> The action is dis-allowed.
This method is sorta like one of the hacks I saw on this board that disallowed
anyone from accessing the admin CP ... while a certain file was stored on the
server, but this method still allows the "real admin" to make changes to his/her profile.
|