From 425cf1e3ae109381f572cd2002dd5e709d549f85 Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 20 Jun 2014 09:43:19 -0700 Subject: [PATCH] Set back to values that work at home. The version from Dreamhost is not ready yet. --- maps/php/MAPS.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/maps/php/MAPS.php b/maps/php/MAPS.php index 7fd877b..72e1390 100755 --- a/maps/php/MAPS.php +++ b/maps/php/MAPS.php @@ -44,10 +44,10 @@ function DBError ($msg, $statement) { } // DBError function OpenDB () { - $db = mysql_connect ("mysql.clearscm.com", "adefaria_admin", "adefaria_admin") + $db = mysql_connect ("localhost", "mapsadmin", "mapsadmin") or DBError ("OpenDB: Unable to connect to database server", "Connect"); - mysql_select_db ("adefaria_maps") + mysql_select_db ("MAPS") or DBError ("OpenDB: Unable to select MAPS database", "adefaria_maps"); } // OpenDB @@ -144,7 +144,7 @@ function Today2SQLDatetime () { function countem ($table, $condition) { $statement = "select count(distinct sender) as count from $table where $condition"; - $result = mysql_query ($statement) + $result = mysql_query ($statement) or DBError ("countem: Unable to perform query: ", $statement); // How many rows are there? @@ -164,7 +164,7 @@ function countlog ($condition="") { } // countlog function SubtractDays ($date, $nbr_days) { - + } // SubtractDays function GetStats ($nbr_days, $date = "") { @@ -205,31 +205,31 @@ function displayquickstats () { $processed = $dates[$today]["processed"]; $returned = $dates[$today]["returned"]; - $returned_pct = $processed == 0 ? 0 : + $returned_pct = $processed == 0 ? 0 : number_format ($returned / $processed * 100, 1, ".", ""); $whitelist = $dates[$today]["whitelist"]; - $whitelist_pct = $processed == 0 ? 0 : + $whitelist_pct = $processed == 0 ? 0 : number_format ($whitelist / $processed * 100, 1, ".", ""); $blacklist = $dates[$today]["blacklist"]; - $blacklist_pct = $processed == 0 ? 0 : + $blacklist_pct = $processed == 0 ? 0 : number_format ($blacklist / $processed * 100, 1, ".", ""); $registered = $dates[$today]["registered"]; $mailloop = $dates[$today]["mailloop"]; $nulllist = $dates[$today]["nulllist"]; - $nulllist_pct = $processed == 0 ? 0 : + $nulllist_pct = $processed == 0 ? 0 : number_format ($nulllist / $processed * 100, 1, ".", ""); - $returned_link = $returned == 0 ? 0 : + $returned_link = $returned == 0 ? 0 : "$returned"; - $whitelist_link = $whitelist == 0 ? 0 : + $whitelist_link = $whitelist == 0 ? 0 : "$whitelist"; - $blacklist_link = $blacklist == 0 ? 0 : + $blacklist_link = $blacklist == 0 ? 0 : "$blacklist"; - $registered_link = $registered == 0 ? 0 : + $registered_link = $registered == 0 ? 0 : "$registered"; - $mailloop_link = $mailloop == 0 ? 0 : + $mailloop_link = $mailloop == 0 ? 0 : "$mailloop"; - $nulllist_link = $nulllist == 0 ? 0 : + $nulllist_link = $nulllist == 0 ? 0 : "$nulllist"; print <<
Search Sender/Subject -
@@ -399,7 +399,7 @@ function DisplayList ($type, $next, $lines) { $last_hit = substr ($last_hit, 5, 2) . "/" . substr ($last_hit, 8, 2) . "/" . substr ($last_hit, 0, 4); - $leftclass = ($i == $lines || $sequence == $total || $sequence == $last) ? + $leftclass = ($i == $lines || $sequence == $total || $sequence == $last) ? "tablebottomleft" : "tableleftdata"; $dataclass = ($i == $lines || $sequence == $total || $sequence == $last) ? "tablebottomdata" : "tabledata"; @@ -505,8 +505,8 @@ function Space () { or DBError ("Space: Unable to execute query: ", $statement); while ($row = mysql_fetch_array ($result)) { - $msg_space = - strlen ($row["userid"]) + + $msg_space = + strlen ($row["userid"]) + strlen ($row["sender"]) + strlen ($row["subject"]) + strlen ($row["timestamp"]) + -- 2.17.1