diff options
author | Alib <aliboba@free.fr> | 2010-03-15 17:56:22 +0100 |
---|---|---|
committer | Alib <aliboba@free.fr> | 2010-03-15 17:56:22 +0100 |
commit | 438912c0c4a4075a5cd74cf9689451c9df4bbe34 (patch) | |
tree | 334e03bbba01b002a34d3cbf81ee7e600ec7bff6 /includes/inc_auth.php | |
parent | a8012963c23e7e5eaf487ee9e192ae5c4d4ccff2 (diff) | |
download | istreamdev-438912c0c4a4075a5cd74cf9689451c9df4bbe34.tar.gz istreamdev-438912c0c4a4075a5cd74cf9689451c9df4bbe34.tar.bz2 |
New Jquery branch. Initial development version for istreamdev 1.0
Diffstat (limited to 'includes/inc_auth.php')
-rwxr-xr-x | includes/inc_auth.php | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/includes/inc_auth.php b/includes/inc_auth.php deleted file mode 100755 index 1545b7c..0000000 --- a/includes/inc_auth.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -global $user, $pass; - -session_start(); - -if (isset($_COOKIE['istream'])) -{ - if(sha1($pass) == $_COOKIE['istream'] ) { - setcookie ("istream", sha1($pass), time()+60*60*24*30); - $authorized = true; - } else { - $authorised = false; - } -} - -# checkup login and password -if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) -{ - if (($user == $_SERVER['PHP_AUTH_USER']) && ($pass == ($_SERVER['PHP_AUTH_PW'])) ) - { - setcookie ("istream", sha1($pass), time()+60*60*24*30); - $authorized = true; - } -} - -# login -if (!$authorized) -{ - header('WWW-Authenticate: Basic Realm="Login please"'); - header('HTTP/1.0 401 Unauthorized'); - echo "Login"; - exit; -} - -?> |