rlm@3: Logout
rlm@3: #
rlm@3: ###############################################################
rlm@3:
rlm@3: /*
rlm@3: -------------------------------------------------------------------
rlm@3: SAMPLE if you only want to request login and password on login form.
rlm@3: Each row represents different user.
rlm@3: Each row requires a comma in the end of it execpt the last
rlm@3:
rlm@3: $LOGIN_INFORMATION = array(
rlm@3: 'zubrag' => 'root',
rlm@3: 'test' => 'testpass',
rlm@3: 'admin' => 'passwd'
rlm@3: );
rlm@3:
rlm@3: --------------------------------------------------------------------
rlm@3: SAMPLE if you only want to request only password on login form so only passwords are listed and required to login
rlm@3: Note: You will have to modify line 59 of this code to read false, and replace lines 52-56 with the sample array below
rlm@3:
rlm@3: $LOGIN_INFORMATION = array(
rlm@3: 'root',
rlm@3: 'testpass',
rlm@3: 'passwd'
rlm@3: );
rlm@3:
rlm@3: --------------------------------------------------------------------
rlm@3: */
rlm@3:
rlm@3: ///////////////////////////////////////////////////////
rlm@3: // do not change code below
rlm@3: ///////////////////////////////////////////////////////
rlm@3:
rlm@3: // show usage example
rlm@3: if(isset($_GET['help'])) {
rlm@3: die('Include following code into every page you would like to protect, at the very beginning (first line):
<?php include("' . str_replace('\\','\\\\',__FILE__) . '"); ?>');
rlm@3: }
rlm@3:
rlm@3: // timeout in seconds
rlm@3: $timeout = (TIMEOUT_MINUTES == 0 ? 0 : time() + TIMEOUT_MINUTES * 60);
rlm@3:
rlm@3: // logout?
rlm@3: if(isset($_GET['logout'])) {
rlm@3: setcookie("e2verify", '', $timeout, '/'); // clear password;
rlm@3: header('Location: ' . LOGOUT_URL);
rlm@3: exit();
rlm@3: }
rlm@3:
rlm@3: if(!function_exists('showLoginPasswordProtect')) {
rlm@3:
rlm@3: // show login form
rlm@3: function showLoginPasswordProtect($error_msg) {
rlm@3: ?>
rlm@3:
rlm@3:
rlm@3:
rlm@3: