X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=maps%2Fphp%2FMAPS.php;h=49d7ca4d837b710a62f5949baa8cb6108632a21f;hb=901870f2fc61575bff838a8556a9fec652ec7d0b;hp=9b94c17d2bee80634233584fe3c2e34d3862ca98;hpb=7c4d6f10dcee2d2be4a4d9595c6f9722024f3b34;p=clearscm.git diff --git a/maps/php/MAPS.php b/maps/php/MAPS.php index 9b94c17..49d7ca4 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); @@ -219,9 +219,9 @@ function displayquickstats() { $current_time = date("g:i:s a"); // Start quickstats - print "
as of $current_time
"; + print "as of $current_time
"; $processed = $dates[$today]["processed"]; $returned = $dates[$today]["returned"]; @@ -239,58 +239,60 @@ function displayquickstats() { $nulllist_pct = $processed == 0 ? 0 : number_format ($nulllist / $processed * 100, 1, ".", ""); - $returned_link = $returned == 0 ? 0 : - "$returned"; - $whitelist_link = $whitelist == 0 ? 0 : - "$whitelist"; - $blacklist_link = $blacklist == 0 ? 0 : - "$blacklist"; - $registered_link = $registered == 0 ? 0 : - "$registered"; - $mailloop_link = $mailloop == 0 ? 0 : - "$mailloop"; - $nulllist_link = $nulllist == 0 ? 0 : - "$nulllist"; + $returned_link = $returned == 0 ? '' : + ""; + $whitelist_link = $whitelist == 0 ? '' : + ""; + $blacklist_link = $blacklist == 0 ? '' : + ""; + $registered_link = $registered == 0 ? '' : + ""; + $mailloop_link = $mailloop == 0 ? '' : + "\""; + $nulllist_link = $nulllist == 0 ? '' : + ""; print <<Processed | +Processed | $processed | n/a | |
Returned | -$returned_link + | ${nulllist_link}Nulllist | +$nulllist | +$nulllist_pct% | +
${returned_link}Returned | +$returned | $returned_pct% | ||
Whitelist | -$whitelist_link + | ${whitelist_link}Whitelist | +$whitelist | $whitelist_pct% |
Blacklist | -$blacklist_link + | ${blacklist_link}Blacklist | +$blacklist | $blacklist_pct% |
Registered | -$registered_link + | ${registered_link}Registered | +$registered | n/a |
Mailloop | -$mailloop_link + | ${mailloop_link}Mailloop | +$mailloop | n/a |
Nulllist | -$nulllist_link - | $nulllist_pct% | -