Beispiel #1
0
* This  is  commercial  software,  only  users  who have purchased a valid *
* license  and  accept  to the terms of the  License Agreement can install *
* and use this program.                                                    *
*                                                                          *
****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
use Tygh\Registry;
use Tygh\Commerceml\Logs;
use Tygh\Commerceml\RusEximCommerceml;
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
$log = new Logs();
list($cml, $s_commerceml) = RusEximCommerceml::getParamsCommerceml();
if ($s_commerceml['status'] != 'A') {
    RusEximCommerceml::showMessageError("Addon Commerceml disabled");
    exit;
}
if (!empty($_SERVER['PHP_AUTH_USER'])) {
    $_data['user_login'] = $_SERVER['PHP_AUTH_USER'];
} else {
    RusEximCommerceml::showMessageError("Enter login and password user");
    exit;
}
list($status, $user_data, $user_login, $password, $salt) = fn_auth_routines($_data, array());
if ($user_login != $_SERVER['PHP_AUTH_USER'] || empty($user_data['password']) || $user_data['password'] != fn_generate_salted_password($_SERVER['PHP_AUTH_PW'], $salt)) {
    RusEximCommerceml::showMessageError("Error in login or password user");
    exit;
}