What makes this page protected?
I've got a log-in script program with a protected page feature.
For my education, what makes this page protected?
Essentially, I just want to learn "How does it worK? the protection, I mean. Thanks. Heres the page code:
Code:
<?php
/**
* @file: protected_content_example.php
* @description: protected content page example
*/
session_start();
include_once "db_config.php";
include_once "classes/system.php";
include_once "classes/account.php";
include_once "classes/account_type.php";
include_once "classes/tools.php";
$account = new account($system);
$acount_type = new account_type($system);
$account_type_id = $account->get_account_type_id();
$account_type_title = $acount_type->get_account_type_title($account_type_id);
if ($account->check_login() == false) {
// redirect to index page if user not loged in
header("Location:index.php");
}
?>
<html>
<body>
<table align="center">
<tr><td align="center"><b>User protected page for not free accounts.</b></td></tr>
<tr><td align="center">membership type: <b><?=$account_type_title ?></b></td></tr>
<tr><td align="center">protected content page.</td></tr>
</table>
</body>
</html><?php
/**
* @file: protected_content_example.php
* @description: protected content page example
*/
session_start();
include_once "db_config.php";
include_once "classes/system.php";
include_once "classes/account.php";
include_once "classes/account_type.php";
include_once "classes/tools.php";
$account = new account($system);
$acount_type = new account_type($system);
$account_type_id = $account->get_account_type_id();
$account_type_title = $acount_type->get_account_type_title($account_type_id);
if ($account->check_login() == false) {
// redirect to index page if user not loged in
header("Location:index.php");
}
?>
<html>
<body>
<table align="center">
<tr><td align="center"><b>User protected page for not free accounts.</b></td></tr>
<tr><td align="center">membership type: <b><?=$account_type_title ?></b></td></tr>
<tr><td align="center">protected content page.</td></tr>
</table>
</body>
</html>