Mailer headers, made the request window a bit prettier

pull/73/head
jonsowman 2010-06-08 17:49:01 +01:00
rodzic 36ba56364f
commit 1e73e79705
4 zmienionych plików z 11 dodań i 9 usunięć

Wyświetl plik

@ -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";

Wyświetl plik

@ -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;

Wyświetl plik

@ -1,6 +1,7 @@
<?php
$c_admin_email = "jon@hexoc.com";
$c_location_save_enable = true;
$c_preds_path = "preds/";

Wyświetl plik

@ -119,10 +119,10 @@ land: <span id="cursor_pred_landrange">?</span>km
<div id="location_save" class="box">
<h1>Request Location Save</h1><br />
<form name="location_save_form" id="location_save_form">
Latitude: <input type="text" name="req_lat" id="req_lat"><br />
Longitude: <input type="text" name="req_lon" id="req_lon"><br />
Altitude: <input type="text" name="req_alt" id="req_alt"><br />
Name: <input type="text" name="req_name" id="req_name"><br />
Latitude: <input type="text" name="req_lat" id="req_lat" size="10"><br />
Longitude: <input type="text" name="req_lon" id="req_lon" size="10"><br />
Altitude: <input type="text" name="req_alt" id="req_alt" size="10"><br />
Name: <input type="text" name="req_name" id="req_name" size="10"><br />
<input type="submit" value="Request" name="submit" id="req_sub_btn">
</form><br />
<a id="req_close">Close this window</a>