| 17 |
if (! ($db = open_db())) { |
if (! ($db = open_db())) { |
| 18 |
return FALSE; |
return FALSE; |
| 19 |
} |
} |
| 20 |
$sql = "SELECT * FROM people WHERE email = '$login'"; |
$sql = "SELECT * FROM people2 WHERE email = '$login'"; |
| 21 |
if (! ($result = pg_exec($db, $sql))) { |
if (! ($result = pg_exec($db, $sql))) { |
| 22 |
echo "Problem with query", pg_ErrorMessage($db), "<BR>"; |
echo "Problem with query", pg_ErrorMessage($db), "<BR>"; |
| 23 |
return FALSE; |
return FALSE; |
| 24 |
} |
} |
| 25 |
if (pg_NumRows($result) == 1) { |
if (pg_NumRows($result) == 1) { |
| 26 |
$row = pg_Fetch_Array($result, 0); |
$row = pg_Fetch_Array($result, 0); |
| 27 |
if (($row["passwd"] == $password) || ($row["passwd"] == "")) { |
if ((passwd_verify($row["passwd"], $password)) || ($row["passwd"] == "")) { |
| 28 |
$s_username = $login; |
$s_username = $login; |
| 29 |
session_register("s_username"); |
session_register("s_username"); |
| 30 |
return TRUE; |
return TRUE; |