Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 14. jún 2025

Súbor: [Platon] / phpWebFileManager / plugins / auth.php (stiahnutie)

Revízia 1.4, Sat Dec 17 09:41:56 2005 UTC (19 years, 6 months ago) by nepto


Zmeny od 1.3: +3 -3 [lines]

Fixed AUTH variables.

<?php

/**************************************************************************
 *
 * auth.php
 *
 * This is a plugin for phpWebFileManager that allows you to restrict
 * access to phpWebFileManager script using HTTP authentication. Edit
 * username and password constants below.
 *
 **************************************************************************/

/* $Platon: phpWebFileManager/plugins/auth.php,v 1.3 2003/12/15 13:48:25 nepto Exp $ */

if (! isset($_SERVER['PHP_AUTH_USER']) || ! isset($_SERVER['PHP_AUTH_PW'])
        || $_SERVER['PHP_AUTH_USER'] != 'username' || $_SERVER['PHP_AUTH_PW'] != 'password') {

    header('WWW-Authenticate: Basic realm="phpWebFileManager authentication"');
    header('HTTP/1.0 401 Unauthorized');
    echo '<center><h1>Authentication required</h1></center>';
    exit;

} else {

    // sucessfully authenticated

}

?>

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok