adding birdweather request email template for now

This commit is contained in:
mcguirepr89
2022-02-01 13:04:27 -05:00
parent 8fdcfc1fc6
commit 6282b84dda
3 changed files with 27 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
$config = parse_ini_file('/home/pi/BirdNET-Pi/thisrun.txt');
} elseif (file_exists('/home/pi/BirdNET-Pi/firstrun.ini')) {
$config = parse_ini_file('/home/pi/BirdNET-Pi/firstrun.ini');
}
$template = file_get_contents("email_template.html");
foreach($config as $key => $value)
{
$template = str_replace('{{ '.$key.' }}', $value, $template);
}
echo $template;
?>
+2
View File
@@ -120,6 +120,7 @@ if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
<input name="longitude" type="number" max="180" min="-180" step="0.0001" value="<?php print($config['LONGITUDE']);?>" required/><br>
<label for="birdweather_id">BirdWeather ID: </label>
<input name="birdweather_id" type="text" value="<?php print($config['BIRDWEATHER_ID']);?>" /><br>
<p><a href="mailto:tim@birdweather.com?subject=Request%20BirdWeather%20ID&body=<?php include('birdweather_request.php'); ?>" target="top">Email Tim</a> to request a BirdWeather ID</p>
<label for="pushed_app_key">Pushed App Key: </label>
<input name="pushed_app_key" type="text" value="<?php print($config['PUSHED_APP_KEY']);?>" /><br>
<label for="pushed_app_secret">Pushed App Secret: </label>
@@ -179,3 +180,4 @@ if(isset($_SESSION['success'])){
</div>
</body>
<input type="reset" form=">
+10
View File
@@ -0,0 +1,10 @@
Hi, Tim, and thank you so much for BirdWeather.com!
%0A%0A
Below is the information I would like to use to request a BirdWeather ID
%0A%0A
Latitude={{ LATITUDE }}%0A
Longitude={{ LONGITUDE }}%0A
Location= [ Create a location name ]%0A
%0A%0A
Thank you so much!%0A
[ Your Name Here ]