'pandas' ); // request login? true - show login and password boxes, false - password box only define('USE_USERNAME', true); ################################################################## # SETTINGS END ################################################################## /////////////////////////////////////////////////////// // do not change code below /////////////////////////////////////////////////////// // show usage example if(isset($_GET['help'])) { die('Include following code into every page you would like to protect, at the very beginning (first line):
<?php include("' . __FILE__ . '"); ?>'); } // logout? if(isset($_GET['logout'])) { setcookie("verify", ''); // clear password; die("Logged out."); } if(!function_exists('showLoginPasswordProtect')) { // show login form function showLoginPasswordProtect($error_msg) { ?> Please enter password to access this blog

Please enter password to access this page



Password:
'; ?>


$val) { if ($_COOKIE['verify'] == md5($val)) { $found = true; break; } } if (!$found) { showLoginPasswordProtect(""); } } ?> The Art of Selection