<?php

if (!class_exists('crm_hardlock')) require_once("common_cadline_libraries/crm_hardlock.class.php");

$realm = 'Restricted area';

$username = 'cadline';
$password = '1CtH&nDG299r';

if ((isset($_SERVER['PHP_AUTH_USER']) && ($_SERVER['PHP_AUTH_USER'] == $username)) and
    (isset($_SERVER['PHP_AUTH_PW']) && ($_SERVER['PHP_AUTH_PW'] == $password))
) {

    crm_hardlock::AddToDebugTable('test', "ShareIT");
} else {
    header("WWW-Authenticate: Basic realm=\"CADLine's Protected Area\"");
    header("HTTP/1.0 401 Unauthorized");

    die();
}
