Subversion Repositories ALCASAR

Rev

Rev 2241 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2241 Rev 2242
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: index.php 2241 2017-05-20 22:32:36Z tom.houdayer $
2
# $Id: index.php 2242 2017-05-20 22:40:33Z tom.houdayer $
3
#
3
#
4
# change user password on ALACASAR NAC
4
# change user password on ALACASAR NAC
5
# Copyright (C) 2003, 2004 Mondru AB.
5
# Copyright (C) 2003, 2004 Mondru AB.
6
# Copyright (C) 2008-20017 ANGEL95 & REXY
6
# Copyright (C) 2008-20017 ANGEL95 & REXY
7
 
7
 
Line 158... Line 158...
158
		if ($link) {
158
		if ($link) {
159
			$sql = "SELECT attribute,value FROM $config[sql_check_table] WHERE username = '$login' AND attribute = '$config[sql_password_attribute]';";
159
			$sql = "SELECT attribute,value FROM $config[sql_check_table] WHERE username = '$login' AND attribute = '$config[sql_password_attribute]';";
160
			$res = @da_sql_query($link,$config, $sql);
160
			$res = @da_sql_query($link,$config, $sql);
161
			if ($res) {
161
			if ($res) {
162
				$row = @da_sql_fetch_array($res, $config);
162
				$row = @da_sql_fetch_array($res, $config);
163
				if (!is_file("crypt/$config[general_encryption_method].php")) {
163
				if (!is_file("../acc/manager/lib/crypt/$config[general_encryption_method].php")) {
164
					exit('<b>Could not open encryption library file</b>');
164
					exit('<b>Could not open encryption library file</b>');
165
				}
165
				}
166
				include("crypt/$config[general_encryption_method].php");
166
				include("../acc/manager/lib/crypt/$config[general_encryption_method].php");
167
				$enc_passwd = $row['value'];
167
				$enc_passwd = $row['value'];
168
				$passwd     = da_encrypt($passwd,$enc_passwd);
168
				$passwd     = da_encrypt($passwd,$enc_passwd);
169
				$newpasswd  = da_encrypt($newpasswd,$enc_passwd);
169
				$newpasswd  = da_encrypt($newpasswd,$enc_passwd);
170
				$newpasswd2 = da_encrypt($newpasswd2,$enc_passwd);
170
				$newpasswd2 = da_encrypt($newpasswd2,$enc_passwd);
171
				if (($passwd === $enc_passwd) && ($newpasswd === $newpasswd2)) {
171
				if (($passwd === $enc_passwd) && ($newpasswd === $newpasswd2)) {
Line 196... Line 196...
196
		<link rel="stylesheet" href="../css/style_intercept.css" type="text/css">
196
		<link rel="stylesheet" href="../css/style_intercept.css" type="text/css">
197
		<link rel="stylesheet" href="../css/pwdmeter.css" type="text/css">
197
		<link rel="stylesheet" href="../css/pwdmeter.css" type="text/css">
198
		<!--[if lt IE 7]>
198
		<!--[if lt IE 7]>
199
			<link rel="stylesheet" href="../css/ie.css" type="text/css">
199
			<link rel="stylesheet" href="../css/ie.css" type="text/css">
200
		<![endif]-->
200
		<![endif]-->
201
		<script src="js/pwdmeter.js"></script>
201
		<script src="../js/pwdmeter.js"></script>
202
	</head>
202
	</head>
203
	<body>
203
	<body>
204
		<div id="cadre_titre" class="titre_controle">
204
		<div id="cadre_titre" class="titre_controle">
205
			<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
205
			<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
206
			<div id="boite_logo"><img src="/images/organisme.png"></div>
206
			<div id="boite_logo"><img src="/images/organisme.png"></div>