adding new BirdNET-Pi.com subdomain request form

This commit is contained in:
mcguirepr89
2022-04-07 14:50:21 -04:00
parent 3ff8a0bcd4
commit c48c53fa17
4 changed files with 29 additions and 0 deletions
+3
View File
@@ -146,6 +146,8 @@ if(isset($_POST['submit'])) {
</style>
</head>
<div class="settings">
<iframe src="https://github.com/sponsors/mcguirepr89/button" title="Sponsor mcguirepr89" style="height:35px;width:116px;border:0;"></iframe>
<?php
if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
$newconfig = parse_ini_file('/home/pi/BirdNET-Pi/thisrun.txt');
@@ -196,6 +198,7 @@ foreach($formats as $format){
<label for="caddy_pwd">Webpage: </label>
<input name="caddy_pwd" type="text" value="<?php print($newconfig['CADDY_PWD']);?>" /><br>
<h3>Custom URL</h3>
<p><a href="mailto:mcguirepr89@gmail.com?subject=Request%20BirdNET-Pi%20Subdomain&body=<?php include('birdnetpi_request.php'); ?>" target="_blank">Email Me</a> if you would like a BirdNETPi.com subdomain. This would be, https://YourLocation.birdnetpi.com</p>
<p>When you update the URL below, the web server will reload, so be sure to wait at least 30 seconds and then go to your new URL.</p>
<label for="birdnetpi_url">BirdNET-Pi URL: </label>
<input name="birdnetpi_url" type="url" value="<?php print($newconfig['BIRDNETPI_URL']);?>" /><br>
+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("scripts/email_template2");
foreach($config as $key => $value)
{
$template = str_replace('{{ '.$key.' }}', $value, $template);
}
echo $template;
?>
+1
View File
@@ -42,6 +42,7 @@ if ($language != "none"){
</style>
</head>
<div class="settings">
<iframe src="https://github.com/sponsors/mcguirepr89/button" title="Sponsor mcguirepr89" style="height:35px;width:116px;border:0;"></iframe>
<h2>Basic Settings</h2>
<form action="" method="POST">
<?php
+10
View File
@@ -0,0 +1,10 @@
Hi, Patrick, I'm a new BirdNET-Pi user and am interested in a subdomain.
%0A%0A
Location= [ Create a location name ]%0A
%0A%0A
An automated best regards!%0A
[ Your Name Here ]
%0A%0A
Acknowledgement: By requesting this BirdNETPi.com subdomain, I acknowledge that
my installation and its data will be made public. I also acknowledge that it is
my responsibility to keep the installation secure.