From 1e73e797052036ccafcf3146706ca96bc677564b Mon Sep 17 00:00:00 2001 From: jonsowman Date: Tue, 8 Jun 2010 17:49:01 +0100 Subject: [PATCH] Mailer headers, made the request window a bit prettier --- predict/ajax.php | 7 ++++--- predict/css/pred.css | 4 ++-- predict/includes/config.inc.php | 1 + predict/index.php | 8 ++++---- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/predict/ajax.php b/predict/ajax.php index ad753a8..2d9ab67 100644 --- a/predict/ajax.php +++ b/predict/ajax.php @@ -35,15 +35,16 @@ case "locationSave": $lon = $_POST['req_lon']; $alt = $_POST['req_alt']; $locname = $_POST['req_name']; - if ( $locname == '' ) { - echo "false ".$locname; + if ( $locname == '' || !$c_location_save_enable ) { + echo "false"; return; } $str = "Latitude: " . $lat . "\n" . "Longitude: " . $lon . "\n" . "Altitude: " . $alt . "\n" . "Name: " . $locname . "\n"; - if ( mail($c_admin_email, "Location Request Save", $str) ) { + $headers = "From: jon@hexoc.com\r\nReply-To:blackhole@hexoc.com\r\nX-Mailer: PHP/".phpversion(); + if ( mail($c_admin_email, "Location Request Save", $str, $headers) ) { echo "true"; } else { echo "false"; diff --git a/predict/css/pred.css b/predict/css/pred.css index c16a895..5caf8ff 100644 --- a/predict/css/pred.css +++ b/predict/css/pred.css @@ -57,8 +57,8 @@ a { text-decoration: underline; color: #333; cursor: pointer; } position: absolute; left: 50%; top: 50%; - width: 500px; - margin-left: -250px; + width: 300px; + margin-left: -150px; margin-top: -120px; padding: 1em; text-align: center; diff --git a/predict/includes/config.inc.php b/predict/includes/config.inc.php index 3b3ba63..d084af7 100644 --- a/predict/includes/config.inc.php +++ b/predict/includes/config.inc.php @@ -1,6 +1,7 @@ ?km

Request Location Save


-Latitude:
-Longitude:
-Altitude:
-Name:
+Latitude:
+Longitude:
+Altitude:
+Name:

Close this window