Mailer headers, made the request window a bit prettier
rodzic
36ba56364f
commit
1e73e79705
|
@ -35,15 +35,16 @@ case "locationSave":
|
||||||
$lon = $_POST['req_lon'];
|
$lon = $_POST['req_lon'];
|
||||||
$alt = $_POST['req_alt'];
|
$alt = $_POST['req_alt'];
|
||||||
$locname = $_POST['req_name'];
|
$locname = $_POST['req_name'];
|
||||||
if ( $locname == '' ) {
|
if ( $locname == '' || !$c_location_save_enable ) {
|
||||||
echo "false ".$locname;
|
echo "false";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$str = "Latitude: " . $lat . "\n" .
|
$str = "Latitude: " . $lat . "\n" .
|
||||||
"Longitude: " . $lon . "\n" .
|
"Longitude: " . $lon . "\n" .
|
||||||
"Altitude: " . $alt . "\n" .
|
"Altitude: " . $alt . "\n" .
|
||||||
"Name: " . $locname . "\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";
|
echo "true";
|
||||||
} else {
|
} else {
|
||||||
echo "false";
|
echo "false";
|
||||||
|
|
|
@ -57,8 +57,8 @@ a { text-decoration: underline; color: #333; cursor: pointer; }
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
width: 500px;
|
width: 300px;
|
||||||
margin-left: -250px;
|
margin-left: -150px;
|
||||||
margin-top: -120px;
|
margin-top: -120px;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$c_admin_email = "jon@hexoc.com";
|
$c_admin_email = "jon@hexoc.com";
|
||||||
|
$c_location_save_enable = true;
|
||||||
|
|
||||||
$c_preds_path = "preds/";
|
$c_preds_path = "preds/";
|
||||||
|
|
||||||
|
|
|
@ -119,10 +119,10 @@ land: <span id="cursor_pred_landrange">?</span>km
|
||||||
<div id="location_save" class="box">
|
<div id="location_save" class="box">
|
||||||
<h1>Request Location Save</h1><br />
|
<h1>Request Location Save</h1><br />
|
||||||
<form name="location_save_form" id="location_save_form">
|
<form name="location_save_form" id="location_save_form">
|
||||||
Latitude: <input type="text" name="req_lat" id="req_lat"><br />
|
Latitude: <input type="text" name="req_lat" id="req_lat" size="10"><br />
|
||||||
Longitude: <input type="text" name="req_lon" id="req_lon"><br />
|
Longitude: <input type="text" name="req_lon" id="req_lon" size="10"><br />
|
||||||
Altitude: <input type="text" name="req_alt" id="req_alt"><br />
|
Altitude: <input type="text" name="req_alt" id="req_alt" size="10"><br />
|
||||||
Name: <input type="text" name="req_name" id="req_name"><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">
|
<input type="submit" value="Request" name="submit" id="req_sub_btn">
|
||||||
</form><br />
|
</form><br />
|
||||||
<a id="req_close">Close this window</a>
|
<a id="req_close">Close this window</a>
|
||||||
|
|
Ładowanie…
Reference in New Issue