Files
AvianVisitors/scripts/include_list.php
T
jaredb7 ac9a0e4cbe Consolidate code in remaining pages, setting page updates
The Config and Advanced setting pages received changes to use the new setSetting() function which looks after creating or updated the setting in the required config files.
Optionally it also specification of a command to run after saving the settings.
Some variables like models, audio formats and frequency shift tools were also moved into common.php

Service Controls page received changes with the replacement of the actual command to execute with a sort of shorthand human friendly version e.g. service <action> <service_name> -- service restart livestream.service

These commands map to the original commands in serviceMaintenance() so this could be called through the API without needing the full-blown commend.
views.php was updated to accommodate this also

System Controls page received a small change to make the process checking for new git updates or getting the last commit hash a single function call.

Include and Exclude species updated to use getFilePath() to generate a path to the required file instead of the hard coded path

Views.php also received similar treatment with replacing some hard coded paths with generated paths, but logic changes to handle the change in running service commands
2023-05-08 23:24:15 +10:00

60 lines
1.9 KiB
PHP

<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
</style>
<?php
$filename = getFilePath('labels.txt');
$eachlines = file($filename, FILE_IGNORE_NEW_LINES);
?>
<div class="customlabels smaller">
<br>
</div>
<body style="height: 90%;">
<p>Warning!<br>If this list contains ANY species, the system will ONLY recognize those species. Keep this list EMPTY unless you are ONLY interested in detecting specific species.</p>
<div class="customlabels2 column1">
<form action="" method="GET" id="add">
<h2>All Species Labels</h2>
<select name="species[]" id="species" multiple size="30">
<option selected value="base">Please Select</option>
<?php
foreach($eachlines as $lines){echo
"<option value=\"".$lines."\">$lines</option>";}
?>
</select>
<input type="hidden" name="add" value="add">
</form>
<div class="customlabels2 smaller">
<button type="submit" name="view" value="Included" form="add">>>ADD>></button>
</div>
</div>
<div class="customlabels2 column4">
<table><td>
<button type="submit" name="view" value="Included" form="add">>>ADD>></button>
<br><br>
<button type="submit" name="view" value="Included" form="del">REMOVE</button>
</td></table>
</div>
<div class="customlabels2 column3">
<form action="" method="GET" id="del">
<h2>Custom Species List</h2>
<select name="species[]" id="value2" multiple size="30">
<option selected value="base">Please Select</option>
<?php
$filename = getFilePath('include_species_list');
$eachlines = file($filename, FILE_IGNORE_NEW_LINES);
foreach($eachlines as $lines){echo
"<option value=\"".$lines."\">$lines</option>";}
?>
</select>
<input type="hidden" name="del" value="del">
</form>
<div class="customlabels2 smaller">
<button type="submit" name="view" value="Included" form="del">REMOVE</button>
</div>
</div>
</body>