X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=maps%2Fphp%2FMAPS.php;h=589e74d53f34b53510a19f162445841a1ea88ba3;hb=f094366fff4ec21f14b0bdc5ff14d86f6222b91c;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 "
"; - print "

Today's Activity

"; + print "

Today's Activity

"; print "

as of $current_time

"; $processed = $dates[$today]["processed"]; @@ -315,7 +316,8 @@ function NavigationBar($userid) { if (!isset ($userid) || $userid == "") { print <<Welcome to MAPS
+

MAPS 2.0

+
Welcome to MAPS
+

MAPS 2.0

+
Welcome $Userid
END; + + displayquickstats(); + print <<
@@ -352,8 +358,6 @@ END; END; - displayquickstats(); - print << +

END; } // if @@ -411,6 +416,7 @@ function DisplayList($type, $next, $lines) { $domain = $row["domain"] == "" ? " " : $row["domain"]; $hit_count = $row["hit_count"] == "" ? " " : $row["hit_count"]; $last_hit = $row["last_hit"] == "" ? " " : $row["last_hit"]; + $retention = $row["retention"] == "" ? " " : $row["retention"]; $comments = $row["comment"] == "" ? " " : $row["comment"]; // Remove time from last hit @@ -434,6 +440,7 @@ function DisplayList($type, $next, $lines) { print "$domain"; print "" . $hit_count . ""; print "" . $last_hit . ""; + print "" . $retention . ""; print "" . $comments . ""; print ""; } // for @@ -492,13 +499,13 @@ END; if ($i < $top - 1) { print "\n"; print "" . $ranking . ""; - print "$domain"; + print "$domain"; print ""; print "$nbr"; } else { print "\n"; print "" . $ranking . ""; - print "$domain"; + print "$domain"; print ""; print "$nbr"; } // if