|
Author |
Message |
JointComms
WebHelper
Joined: 03 May 2002
Posts: 79
Location: Windsor, CANADA
|
Posted:
Fri Nov 15, 2002 5:06 pm (21 years, 5 months ago) |
|
If I was to type index.php?op=reg, can you tell me what is really happening?
I know it's calling up a screen but it must be calling a file or something.
Here's why, I'm using a piece of PHP software which has the above link in it. I want to remove public access to the link BUT, if someone familiar with the software sees it then they would still know about it. So, I want to rename the file and only I would know what the new name is.
Thanks |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Fri Nov 15, 2002 5:08 pm (21 years, 5 months ago) |
|
By calling index.php?op=reg, the person is in fact opening the index.php file, which will then perform a different action depending on what is after the "?" sign.
However, without looking at the code I cannot tell you how to remove the possibility of accessing that page. |
________________________________
|
|
|
|
JointComms
WebHelper
Joined: 03 May 2002
Posts: 79
Location: Windsor, CANADA
|
Posted:
Fri Nov 15, 2002 5:47 pm (21 years, 5 months ago) |
|
Hi Daniel,
But, is op=reg a bookmark or flag within the index file or something?
THanks for your time. |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Fri Nov 15, 2002 5:52 pm (21 years, 5 months ago) |
|
$op is a PHP variable, and by calling index.php?op=reg you're setting this variable to 'reg'. The PHP script will then do different things depending on the value of $op. |
________________________________
|
|
|
|
JointComms
WebHelper
Joined: 03 May 2002
Posts: 79
Location: Windsor, CANADA
|
Posted:
Fri Nov 15, 2002 6:13 pm (21 years, 5 months ago) |
|
Here's part of the code. I don't know if it will help make any sense to you - since it's only part of the script.
$seeIfTheAdminIsSet = checkAdmin();
if($seeIfTheAdminIsSet)
{
$regLink = "<a href=\"index.php?op=reg\">click here</a> to create your own!<BR><BR>";
}
switch($op) {
case "reg":
checkUser();
break;
case "list":
listUsers();
break;
case "testcreateUser":
create_user_dir($isPub, $username, $passwd, $passwd2, $albumSetting, $newsOn, $rateOn, $commentOn, $newsProtect, $email, $siteTitle, $inviteOnly, $defaultAlbum);
break;
default:
echo $regLink;
listUsers();
}
?> |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Fri Nov 15, 2002 6:15 pm (21 years, 5 months ago) |
|
Well, if you want to only stop people from going to index.php?op=reg, delete this code:
Code: | case "reg":
checkUser(); |
If you want to stop people from going to index.php?op=anything, delete all this code:
Code: | switch($op) {
case "reg":
checkUser();
break;
case "list":
listUsers();
break;
case "testcreateUser":
create_user_dir($isPub, $username, $passwd, $passwd2, $albumSetting, $newsOn, $rateOn, $commentOn, $newsProtect, $email, $siteTitle, $inviteOnly, $defaultAlbum);
break;
default:
echo $regLink;
listUsers();
} |
|
________________________________
|
|
|
|
JointComms
WebHelper
Joined: 03 May 2002
Posts: 79
Location: Windsor, CANADA
|
Posted:
Fri Nov 15, 2002 6:27 pm (21 years, 5 months ago) |
|
I'm gonna try this out - THANKS AGAIN |
|
|
|
|
|
|
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.
|
Page generation time: 0.142321 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
|