convert history.php todays_detections.php
This commit is contained in:
+1
-14
@@ -8,12 +8,7 @@ error_reporting(E_ALL);
|
|||||||
ini_set('display_errors',1);
|
ini_set('display_errors',1);
|
||||||
ini_set('display_startup_errors',1);
|
ini_set('display_startup_errors',1);
|
||||||
require_once 'scripts/common.php';
|
require_once 'scripts/common.php';
|
||||||
|
$config = get_config();
|
||||||
if (file_exists('./scripts/thisrun.txt')) {
|
|
||||||
$config = parse_ini_file('./scripts/thisrun.txt');
|
|
||||||
} elseif (file_exists('./scripts/firstrun.ini')) {
|
|
||||||
$config = parse_ini_file('./scripts/firstrun.ini');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($_GET['date'])){
|
if(isset($_GET['date'])){
|
||||||
$theDate = $_GET['date'];
|
$theDate = $_GET['date'];
|
||||||
@@ -38,14 +33,6 @@ if(isset($_GET['blocation']) ) {
|
|||||||
header("Pragma: no-cache");
|
header("Pragma: no-cache");
|
||||||
header("Expires: 0");
|
header("Expires: 0");
|
||||||
|
|
||||||
|
|
||||||
$user = trim(shell_exec("awk -F: '/1000/{print $1}' /etc/passwd"));
|
|
||||||
$home = trim(shell_exec("awk -F: '/1000/{print $6}' /etc/passwd"));
|
|
||||||
|
|
||||||
|
|
||||||
//$sunrise = date_sunrise(time(), SUNFUNCS_RET_TIMESTAMP, $config["LATITUDE"], $config["LONGITUDE"]);
|
|
||||||
//$sunset = date_sunset(time(), SUNFUNCS_RET_TIMESTAMP, $config["LATITUDE"], $config["LONGITUDE"]);
|
|
||||||
|
|
||||||
$list = array ();
|
$list = array ();
|
||||||
|
|
||||||
//$hrsinday = intval(($sunset-$sunrise)/60/60);
|
//$hrsinday = intval(($sunset-$sunrise)/60/60);
|
||||||
|
|||||||
@@ -11,18 +11,9 @@ session_start();
|
|||||||
error_reporting(E_ERROR);
|
error_reporting(E_ERROR);
|
||||||
ini_set('display_errors',1);
|
ini_set('display_errors',1);
|
||||||
require_once 'scripts/common.php';
|
require_once 'scripts/common.php';
|
||||||
|
$home = get_home();
|
||||||
if (file_exists('./scripts/thisrun.txt')) {
|
$config = get_config();
|
||||||
$config = parse_ini_file('./scripts/thisrun.txt');
|
$site_name = get_sitename();
|
||||||
} elseif (file_exists('./scripts/firstrun.ini')) {
|
|
||||||
$config = parse_ini_file('./scripts/firstrun.ini');
|
|
||||||
}
|
|
||||||
|
|
||||||
if($config["SITE_NAME"] == "") {
|
|
||||||
$site_name = "BirdNET-Pi";
|
|
||||||
} else {
|
|
||||||
$site_name = $config['SITE_NAME'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($kiosk) && $kiosk == true) {
|
if(isset($kiosk) && $kiosk == true) {
|
||||||
echo "<div style='margin-top:20px' class=\"centered\"><h1><a><img class=\"topimage\" src=\"images/bnp.png\"></a></h1></div>
|
echo "<div style='margin-top:20px' class=\"centered\"><h1><a><img class=\"topimage\" src=\"images/bnp.png\"></a></h1></div>
|
||||||
@@ -64,10 +55,6 @@ ensure_db_ok($statement6);
|
|||||||
$result6 = $statement6->execute();
|
$result6 = $statement6->execute();
|
||||||
$totalspeciestally = $result6->fetchArray(SQLITE3_ASSOC);
|
$totalspeciestally = $result6->fetchArray(SQLITE3_ASSOC);
|
||||||
|
|
||||||
$user = shell_exec("awk -F: '/1000/{print $1}' /etc/passwd");
|
|
||||||
$home = shell_exec("awk -F: '/1000/{print $6}' /etc/passwd");
|
|
||||||
$home = trim($home);
|
|
||||||
|
|
||||||
if(isset($_GET['comname'])) {
|
if(isset($_GET['comname'])) {
|
||||||
$birdName = $_GET['comname'];
|
$birdName = $_GET['comname'];
|
||||||
$birdName = str_replace("_", " ", $birdName);
|
$birdName = str_replace("_", " ", $birdName);
|
||||||
@@ -200,13 +187,6 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" ) {
|
|||||||
$lines=null;
|
$lines=null;
|
||||||
$licenses_urls = array();
|
$licenses_urls = array();
|
||||||
|
|
||||||
if (file_exists('./scripts/thisrun.txt')) {
|
|
||||||
$config = parse_ini_file('./scripts/thisrun.txt');
|
|
||||||
} elseif (file_exists('./scripts/firstrun.ini')) {
|
|
||||||
$config = parse_ini_file('./scripts/firstrun.ini');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
while($todaytable=$result0->fetchArray(SQLITE3_ASSOC))
|
while($todaytable=$result0->fetchArray(SQLITE3_ASSOC))
|
||||||
{
|
{
|
||||||
$iterations++;
|
$iterations++;
|
||||||
|
|||||||
Reference in New Issue
Block a user