2 require('password.php3');
3 if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php3"))
4 include_once("../lib/sql/drivers/$config[sql_type]/functions.php3");
6 echo "<b>Could not include SQL library</b><br>\n";
10 if ($action == 'checkpass'){
11 $link = @da_sql_pconnect($config);
13 $res = @da_sql_query($link,$config,
14 "SELECT attribute,value FROM $config[sql_check_table] WHERE username = '$login'
15 AND (attribute = 'User-Password' OR attribute = 'Crypt-Password');");
17 $row = @da_sql_fetch_array($res,$config);
18 if (is_file("../lib/crypt/$config[general_encryption_method].php3")){
19 include("../lib/crypt/$config[general_encryption_method].php3");
20 $enc_passwd = $row[value];
21 if ($row[attribute] == 'Crypt-Password') {
22 $passwd = da_encrypt($passwd,$enc_passwd);
24 if ($passwd == $enc_passwd)
25 $msg = '<font color=blue><b>YES It is that</b></font>';
27 $msg = '<font color=red><b>NO It is wrong</b></font>';
30 echo "<b>Could not open encryption library file</b><br>\n";
33 echo "<tr><td colspan=3 align=center>$msg</td></tr>\n";