X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=maps%2Fphp%2FMAPS.php;h=589e74d53f34b53510a19f162445841a1ea88ba3;hb=a6e9dab78f1a0b8654f7a7e1d6f007a9f417ff51;hp=9b94c17d2bee80634233584fe3c2e34d3862ca98;hpb=7c4d6f10dcee2d2be4a4d9595c6f9722024f3b34;p=clearscm.git
diff --git a/maps/php/MAPS.php b/maps/php/MAPS.php
index 9b94c17..589e74d 100755
--- a/maps/php/MAPS.php
+++ b/maps/php/MAPS.php
@@ -50,7 +50,7 @@ function DBError($msg, $statement) {
function OpenDB() {
global $db;
- $db = mysqli_connect("localhost", "maps", "spam")
+ $db = mysqli_connect("127.0.0.1", "maps", "spam")
or DBError("OpenDB: Unable to connect to database server", "Connect");
mysqli_select_db($db, "MAPS")
@@ -74,7 +74,7 @@ function SetContext($new_userid) {
function Encrypt($password, $userid) {
global $db;
- $statement = "select encode(\"$password\",\"$userid\")";
+ $statement = "select hex(aes_encrypt(\"$password\",\"$userid\"))";
$result = mysqli_query($db, $statement)
or DBError("Encrypt: Unable to execute statement", $statement);
@@ -110,6 +110,7 @@ function Login($userid, $password) {
// Check if user exists
$dbpassword = UserExists($userid);
+ print "dbpassword = $dbpassword
";
// Return -1 if user doesn't exist
if ($dbpassword == -1) {
@@ -220,7 +221,7 @@ function displayquickstats() {
// Start quickstats
print "
as of $current_time
"; $processed = $dates[$today]["processed"]; @@ -315,7 +316,8 @@ function NavigationBar($userid) { if (!isset ($userid) || $userid == "") { print <<