- Anonymous
- Wednesday, July 26th, 2006 at 9:17:06pm MDT
- from functions.php (included in both _list and _body and get's called in _body):
- function authbox(){
- if(($_SERVER['PHP_AUTH_USER'] == "foo") && ($_SERVER['PHP_AUTH_PW'] == "bar")) {
- $_SESSION['auth'] = 1;
- } else {
- $_SESSION['auth'] = 0;
- }
- if ($_SESSION['auth'] != 1) {
- header( "WWW-Authenticate: Basic realm=\"Authorization Required!\"" );
- header( "HTTP/1.0 401 Unauthorized" );
- echo "Authorization Required!";
- exit();
- }
- }
- from _list: (obviously i have tried reloading this frame after the value has changed)
- if ($_SESSION['auth'] == 0 ) {
- print '<br/>'; url_link('index_body.php?go=login','Login to Artax.','login'); print '<br/>';
- } else {
- print '<br/>'; url_link('index_body.php?go=logout','Logout of Artax.','logout'); print '<br/>';
- }
- print 'auth:"' . $_SESSION['auth'] . '"';
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.