Two manage who sees what pages, you need to give each page (or page section) some kind of unique indentifier that you can store in a db table (let's call that table 'pages').
PAGES:
page_id (unique int id)
page_text_id (perhaps to be used in your PHP code, something like CUSTOMER_PROFILE)
Then you need to use a lookup table to either assign permissions directly from a user to a page (which means you'll have a lot of records in this table probably) OR you use this lookup table to assign permissions from a user type to a page. A user type might be admin, moderator, technician or pee-on or nobody or whatever. Admins might have access to all pages. Moderators might have access to particular sections of the site. etc. Let's have a table called user_types and one called user_type_page_assoc.
USER_TYPES
user_type_id - int primary key
name - varchar 50 or something...holds stuff like "admin" or "moderator"
USER_TYPE_PAGE_ASSOC
user_type_id - points to a user_type record
page_id - points to a page record
And then finally you'd store a user_type_id for each user.
Then in each page (or page section) you'd have to run a query to make sure that the current user's user_type had a record in USER_TYPE_PAGE_ASSOC for the current page.
The way I have dealt with getting https in the right spots and not where you don't need it is to create a file called something like _top.php which i [man]require[/man] in every single page. By default, this file would prevent HTTPS from being used so that we conserve server resources. If, however, a particular constant is defined as true, then I would force https.
// define PAGE_REQUIRES_HTTPS to be true to force HTTPS
if (PAGE_REQUIRES_HTTPS == true && $_SERVER['HTTPS'] != "on") {
$new_url = "https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
header("Location: $new_url");
exit;
}
// if PAGE_REQUIRES_HTTPS is not true and https is on, let's redirect and turn it off
if (PAGE_REQUIRES_HTTPS != true && $_SERVER['HTTPS'] == "on") {
$new_url = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
header("Location: $new_url");
exit;
}