diff --git a/admin.php b/admin.php index 937d7db75bb065ab49b6fd691ff7b0e8e90e60c3..18c397471206d4f61c3dfd3c6cd5539f00ea37ad 100644 --- a/admin.php +++ b/admin.php @@ -1,7 +1,21 @@ <? // TEMPORARY SECURITY PATCH: -if ($user->userid != "Dries") exit(); +// if ($user->userid != "Dries") exit(); + if(!$PHP_AUTH_USER) { + Header("WWW-Authenticate: Basic realm=\"Admin Area\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "The cow says: Moo! You can't come in!\n"; + exit; + } else { + if ($PHP_AUTH_PW != "mOo!") + { + Header("WWW-Authenticate: Basic realm=\"Admin Area\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "The cow says: Moo! You can't come in!\n"; + exit; + } + } /* * Account administration: @@ -688,4 +702,4 @@ function info_display() { admin_footer(); -?> \ No newline at end of file +?>